↧
Answer by Sebastian Palma for Rails feed from multiple models
What you're doing with if activity.model_name = Play is an assignation, you can do the same using == to compare the class from such object and to select the attribute corresponding to the object from...
View ArticleRails feed from multiple models
Based on this question, I have created a controller: @activities = (@plays + @wants).sort_by {|a| a.created_at}.reverse and a view: - @plays.each do |play| You played #{play.game.name} However it can...
View Article