Access two models in one view in Rails
-
29-09-2019 - |
Question
Background: I'm trying to create a simple feed reader for which I'm using the feedzirra. I am developing in Rails 3.
This is probably pretty simple, but I'm trying to figure out how to access the contents of two related models from a single view. The model relationship is as follows:
Feed has_many Entries
Entry belongs_to Feed
Thanks for any help!
Solution
you can use rails 3's nested models.
here are a few links to help you
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow