Quantcast
Channel: Rails feed from multiple models - Stack Overflow
Browsing latest articles
Browse All 2 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 latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>