search for: anycontrol

Displaying 2 results from an estimated 2 matches for "anycontrol".

Did you mean: addcontrol
2007 Nov 20
2
Plugin: create instance methods dynamically in ClassMethods?
...return render(:action => ''list'') end end end end In init.rb I have the following: require File.dirname(__FILE__) + ''/lib/incense_crud'' ActionController::Base.send(:include, IncenseCrud) So far so good. In any controller I can put now class AnyController < ApplicationController performs_incense_crud end and the performs_incense_crud method is invoked. Cool - the class method has been added to the controller through the plugin. But strangely the instance method index does not seem to have been added! It''s just disappeared when tryi...
2007 Aug 31
2
Can module spec "behave like" controller spec?
Hello everyone: Right now I am writing spec on modules, which are provided by my colleagues. Some of the modules actually contain action methods. I tried very hard to spec those action methods in modules. But it seems that the rspec does not allow module spec to ''get'' action like controller does. After I saw the documentation, I then used :behaviour_type=>:controller.