How to display related post in rails application -


i'm beginner rails application, have troubled issue display related post, show post separately according id have not idea how show related post.

below code show post separately according id:

def postdetails  @details= post.find(params[:post_id]) end 

now how can rich solution?

this not answer, i'll delete if required.

--

your question highly ambiguous, meaning it's open interpretation in many different ways. whilst not problem, when comes application functionality, need specific possible.

contrary new buzzwords of "full stack engineer", "devops" etc - core of computing design functions & algorithms "compute" data. case scenario professional developer outline spec, , work towards implementing it.


to answer question broadly asked it, have define how wish "relate" posts.

there several options (all involve data sampling) --

  • define each post "tags" or similar categorization
  • create algorithm parse title, pull out keywords & search them
  • have users define posts "related"

as can see, there 1 constant above - need "benchmark" associate data. keywords, tags, associated posts - have able identify data want.

thus, you'll have define pattern wish employ. can talk through each option; write without knowing how want it.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -