search for: usershelper

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

Did you mean: userhelper
2007 Apr 11
13
View Specs Fail with "protected method render"
...ml_spec.rb:13: Note the "protected method `render'' called for #<Spec::Rails::Runner::ViewSpecController:0x3197dfc>" Here''s an example spec: require File.dirname(__FILE__) + ''/../../spec_helper'' context "/users/new.rhtml" do include UsersHelper setup do @errors = mock("errors") @errors.stub!(:count).and_return(0) @user = mock_user @user.stub!(:errors).and_return @errors assigns[:user] = @user end specify "should render new form" do render "/users/new.rhtml" response.should...
2011 Apr 08
5
How to extend a helper using plugin?
Hello, I''m facing this problem while trying to extend the parse_redmine_links helper method in Redmine-1.1.0 (Rails-2.3.5) from my plugin. My idea is to use alias_method_chain so the extended version could call the original version and adjust the result to it''s liking. Anything I''ve tried so far exposes this behavior: the first render of a page uses the extended
2012 Nov 06
2
rspec failure upon revisit
...were any problems and this is what I received. I didn''t modify anything except I did overwrite users_controller.rb and users_controller_spec.rb when starting another chapter of the tutorial. I''m not sure what changed. I''m having trouble diagnosing the error: Pending: UsersHelper add some examples to (or delete) /Users/andrewchickedantz/rails_projects/sample_app/spec/helpers/users_helper_spec.rb # No reason given # ./spec/helpers/users_helper_spec.rb:14 User add some examples to (or delete) /Users/andrewchickedantz/rails_projects/sample_app/spec/models/user_spec.r...
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if the user has no access right) this is my code, it work the first time I run the application, the second time I refresh the page I always get "stack level too deep error" module UsersHelper include ActionView::Helpers::UrlHelper alias_method :link_to_original, :link_to def permission? true end def link_to(name, options = {}, html_options = nil,*parameters_for_method_reference) if permission? link_to_original( name, options,html_options,*parameters_for_metho...
2005 Nov 29
0
undefined method `link_to'
Hi, all I''m trying call link_to from another helper but got this error: undefined method `link_to'' for module `UserHelper'' how can I get access to helper from another helper? this is my users_helper.rb: module UsersHelper alias ink_to_original link_to alias link_to link_to_permission def link_to_permission(name, options = {}, html_options = nil, *parameters_for_method_reference) if @permission if html_options html_options = html_options.stringify_keys convert_options_to_javascript!(h...
2009 Oct 06
1
Problems Processing multiple form elements generated by javascript actions
...ams[:id]) if @user.update_attribute(:enabled, false) flash[:notice] = "User disabled" else flash[:error] = "There was a problem disabling this user." end redirect_to :back #action => ''index'' end Helpers: users_helper.rb module UsersHelper def add_schedule_link(name) link_to_function name do |page| page.insert_html :bottom, :schedules, :partial => ''schedule'', :object => Schedule.new end end end