Hi,



Please ask questions like this on the rubyonrails-talk mailing list. This list 
is reserfved for discussion about the core of the Rails framework.

On Mon, Aug 31, 2015 at 2:00 PM, venu madhav chitta
<venu.chitta1...@gmail.com> wrote:

> I am implementing strategy pattern in Rails where I have Models like User, 
> Item, Category and need to recommend items for the users depending on 
> various algorithms (strategies) that user selects in view. 
> I am having a Recommend class which has an interface of recommend(user_id, 
> strategy) and returns array of item_id. The strategy in recommend will be 
> decided at runtime depending on the option user selects in the view. I have 
> placed the recommend interface in /lib directory and the strategies in 
> /lib/strategy directory. The algorithm is very naive and uses SQL 
> statements.
> I want to make sure if I placed the files in proper directories or Should I 
> need place the recommend class and all the strategies in models or any 
> where else. I am really confused.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-core+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> Visit this group at http://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to