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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -