Quantcast
Channel: Rails feed from multiple models - Stack Overflow
Browsing all 2 articles
Browse latest View live

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 Article



Rails 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
Browsing all 2 articles
Browse latest View live




Latest Images