Created
August 10, 2010 17:45
-
-
Save jstorimer/517669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem i rails -v=2.3.10 | |
rails broken-helper-all | |
cd broken-helper-all | |
./script/generate scaffold article | |
./script/generate scaffold product | |
# app/controllers/application_controller.rb | |
class ApplicationController < ActionController::Base | |
helper :all # include all helpers, all the time | |
end | |
# app/helpers/articles_helper.rb | |
module ArticlesHelper | |
def foo(a); end | |
end | |
# app/helpers/products_helpers.rb | |
def ProductsHelper | |
def foo(a,b); end | |
end | |
# app/views/articles/index.html.erb | |
<%= foo('bar') %> | |
rake test:functionals #=> ArgumentError: wrong number of arguments (1 for 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem i rails -v=3.0.1 | |
rails new broken-helper-all | |
cd broken-helper-all | |
bundle install | |
rails g controller articles index | |
rails g controller products index | |
# helper :all is now the framework default and defined in ActionController::Base | |
# app/helpers/articles_helper.rb | |
module ArticlesHelper | |
def foo(a); end | |
end | |
# app/helpers/products_helpers.rb | |
module ProductsHelper | |
def foo(a,b); end | |
end | |
# app/views/articles/index.html.erb | |
<%= foo('bar') %> | |
rake test:functionals #=> ArgumentError: wrong number of arguments (1 for 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LH Ticket: https://rails.lighthouseapp.com/projects/8994/tickets/5467-helper-all-behaviour-doesnt-respect-the-current-controller