I have an app in which the club has many locations: Club & amp;
I am trying to pre-load the club in the controller so that all the action is from that club.
Routes are nested; However, in the Places controller, this routes.rb club.rb admin / locations_controller.rb In addition, in the end: what's wrong in my routes, who is not looking for it. Administrator / club / location controller in locations? I'm not sure that this is part of the problem. From Rake Routes / code> model worsh You can try: club model is not getting what I am doing?
Namespace: Administrator resources: clubs use resources: end of locations < / Pre>
class club & lt; ActiveRecord :: Base is_many: membership has_many: users have_many: users are_many: places #accepts_nested_attributes_for: end of locations
< Code> Classroom Administrator: Location Controller & lt;
admin_club_locations POST / admin / clubs /: club_id / location (.: Format) Admin / place # create new_admin_club_location GET /admin/clubs/:club_id/locations/new((.:format) Admin / Location # New edit_admin_club_location Received / Administrator / Club /: club_id / locations /: id / edit (.display) Admin / Location # edit admin_club_location PUT /admin/clubs/:club_id/locations/:id(.:format) admin / locations # update DELETE / admin / clubs /: club_id / locations /: ID (.: This is probably possible on
club Looks
def load_club @club = :: Club.find (params [: club_id]) expiration < / Div>
No comments:
Post a Comment