search for: team_controller

Displaying 4 results from an estimated 4 matches for "team_controller".

Did you mean: item_controller
2006 Aug 14
2
Another try with REST
.... My routes.rb is: map.connect '':controller/service.wsdl'', :action => ''wsdl'' # Install the default route as the lowest priority. map.connect '':controller/:action/:id'' map.resources :team <---- THIS LINE ADDED BY ME Also have a team_controller.rb, a team.rb model and scaffolding for it. If I invoke /team/1;edit url it shows me the edit form for team 1, that''s right. But if I invoke /team/1 I receive the response: Unknown action No action responded to 1 Why it didn''t show me the team 1? -- Posted via http://www.ru...
2006 Jan 17
0
URL to method?
Do I need to edit routes.rb to get the following behavior? URL ==> method (source) /admin ==> AdminController#index (/controllers/admin_controller.rb) /admin/teams/list ==> Admin::TeamController#list (/controllers/admin/team_controller.rb) /admin/teams/edit/1 ==> Admin::TeamController#edit(:id => 1) (/controllers/admin/team_controller.rb) And will it wreck havoc with my views? Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are...
2006 Jul 18
1
Saving an ActiveRecord object
...ave an object that extends of ActiveRecord: NoMethodError in TeamController#add_player You have a nil object when you didn''t expect it! The error occured while evaluating nil.keys .... .... #{RAILS_ROOT}/app/models/player.rb:17:in `create_player'' #{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player'' And my Player model is: class Player < ActiveRecord::Base belongs_to :team # Crea un jugador con los valores por defecto def Player.create_player(team_id) player = Player.new player.relate_to_team(team_id) player.save <----------------------...
2006 Aug 11
2
Some questions of REST actions
I''ve set up my application to use edge rails in order to get REST functionality. I''ve a controller called team (team_controller.rb) with some actions (index, list, show, create, new....). Moreover in routes.rb I''ve added map.resources :team so I guess I could call localhost:3000/xxxx/team/1 or localhost:3000/xxxx/team/1;edit Well, when I do the first call, server response me ''Unknown action No acti...