search for: controller_fil

Displaying 6 results from an estimated 6 matches for "controller_fil".

Did you mean: controller_file
2006 May 23
6
How to list all models of an application?!?
How can I get a list of all model classes in the domain of a Rails application (all models, both in "app/models" and in components/somedir/model.rb)? Thanx in advance for your precious help! Edoardo "Dado" Marcora
2006 Jan 19
4
UserEngine - rake bootstrap aborted => undefined method `synchronize_with_controllers'' for Permission:Class
...ith_controllers'' for Permission:Class My environment is Rails 1.0.0 Ruby 1.8.2 WinXP WebBRICK MySQL 4.1.14 I found the following in a thread about making changes to the user_engine/app/models/permission.rb and have done this: BEFORE CHANGE: # we need to load all the controllers... controller_files.each do |file_name| require file_name #if /_controller.rb$/ =~ file_name end AFTER CHANGE: # we need to load all the controllers... controller_files.sort.each do |file_name| require file_name #if /_controller.rb$/ =~ file_name end I also made the change in the...
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there, I''ve just installed login_engine and user_engine from the repositories, followed the setup procedures as documented in: vendor/plugins/user_engine/README But I''m getting the following failure: vince@vaio:~/Projects/Booking$ rake bootstrap (in /home/vince/Projects/Booking) rake aborted! undefined method `edit'' for class `UserController''
2009 Feb 20
6
How to mock an object defined in the before_filter function?
...quot; in the controller and variable @var is defined in another place and controller just uses it. my_var.stub!(:function).and_return(@var) doesn''t seem to be working. Is there is something like my_var.stub!(:function).add_variable(@var).and_return(:true) ? Thank you, Evgeny =============controller_file before_filter :find_comment, :only => [:destroy] def destroy @destroy_id = @comment.id #to be used in rendering partial @comment.destroy respond_to do |format| format.js end end def find_comment @comment = Comment.find(:first, :conditions => [''i...
2006 Jan 23
2
UserEngine -- Permission.synchronize_with_controllers -- trouble with my own controller modules
...s separated in their own "admin" directory directly under the normal controllers directory. I''ve stepped through the Permission.synchronize_with_controllers method with the console to try to figure out what''s going on. This line does pick up all of my controllers. controller_files = Dir[RAILS_ROOT + "/app/controllers/**/*_controller.rb"] But then this line doesn''t include any of my admin controllers. ApplicationController.all_controllers.collect do |controller| If I understand this correctly, ApplicationController is an instance of my applicatio...
2006 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a