ruby on rails - how to make relationship works in route, controller, view ? has_many, belongs_to
问题 I am struggling to get my relationship in rails to work. I have a User,Gallery,Comment model class Gallery has_many :comments belongs_to :user end class User has_many :comments has_many :galleries end class Comment belongs_to :gallery belongs_to :user end now what should i do in the routes, controller and views to link this all up ? please help me ? its quite confusing finding out the answers. If can, I dont want it to be nested like in the railscast, but i want for each model, eg gallery i