search for: playerscontroller

Displaying 7 results from an estimated 7 matches for "playerscontroller".

2007 Oct 08
6
spec''in controllers request for nested routes
describe PlayersController, "handling GET /saltmines/games/1/players" do before do @game = mock_model(Game, :to_param => "1") @game.stub_association!(:players, :find => mock_model(Player)) end def do_get get :index, :game_id => @game end it "should be successful&quot...
2009 Dec 21
3
beginner problem
Hi, I´m starting using rails. I have one problem. I create a controller, the code is the next: class PlayersController < ApplicationController scaffold:player end I did all the things that I suppose to do, but a problem appears when try to open my webpage application. The error is the next NoMethodError in PlayersController#index undefined method `scaffold'' for PlayersController:Class RAILS_ROOT:...
2006 Jan 23
2
UserEngine -- Permission.synchronize_with_controllers -- trouble with my own controller modules
...ies? /app/controllers/application.rb require ''login_engine'' class ApplicationController < ActionController::Base include LoginEngine include UserEngine helper :user model :user before_filter :authorize_action end Example of one of my admin controllers. class Admin::PlayersController < ApplicationController layout "admin_layout" #... methods here (I have several methods defined here, but figured no one really cared to see them all ... end -- James
2007 Oct 05
7
Easy AR association stubbing
I''ve added a method to the mock class that makes it pretty easy to stub associations in rails. I''ve been using it for awhile and it seems to cut down on a lot of setup code for the controller and model specs that use associations. #before @person = mock_model(Person) posts = mock(''post_proxy'') posts.stub!(:build).and_return(mock_model(Post, :save => true))
2005 Nov 19
1
link_to weirdness
...order_dir == ''asc'' ? ''desc'' : ''asc'' }%> But instead it renders: http://example.com:3000/admin/admin/players?order_col=fname&order_dir=desc It''s doing ''admin'' twice. Admin is a controller module (class Admin::PlayersController < ApplicationController) Anybody know what''s going on here..? Jeroen
2007 Nov 17
0
Postgres sequencer and rails
...about non-initialized sequencer. So why he was trying to use sequencer when than he didn''t use the value to fill id field ? What is the the standard procedure to store new record when only basic inheritance of model and controller is used ? class Player < ActiveRecord::Base end class PlayersController < ApplicationController scaffold:player end thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send e...
2008 Dec 19
2
before_filter for a specific controller/action
I''m learning about before_filter, implementing a simple "you must be logged on" thing. It works great, but I need to allow people to create a player as well. By writing the except as attached, that works, but then everyone has access to all "new" methods, which I don''t really want. Can someone help me with how to properly construct this to limit non-logged