Rails 5 rendering partials and passing data
问题 I'm having trouble getting traction on what the general ways data gets passed around from and is made available to partials. For example: I have a controller handing off an instance variable to a template that renders a partial: static_pages_controller.rb: def home @feed_items = current_user.feed end home.html.erb: <%= render 'shared/feed' %> _feed.html.erb: <%= render @feed_items %> Now, inside my User model is an instance method that reaching into the database to get her posts: user.rb: def