1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

group methods defined in the current scope

This commit is contained in:
Giovanni Caniato 2014-05-28 19:29:34 +02:00
parent cb1d6c4684
commit dfcb342a8f
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ module Devise
opts[:contains].map! { |m| ":#{m}" }
mappings = "[#{ opts[:contains].join(',') }]"
ActionController::Base.class_eval <<-METHODS, __FILE__, __LINE__ + 1
class_eval <<-METHODS, __FILE__, __LINE__ + 1
def authenticate_#{group_name}!(favourite=nil, opts={})
unless #{group_name}_signed_in?
mappings = #{mappings}

View file

@ -51,7 +51,7 @@ class HelpersTest < ActionController::TestCase
end
test 'resources methods are not controller actions' do
assert @controller.class.action_methods.empty?
assert @controller.class.action_methods.delete_if { |m| m.include? 'commenter' }.empty?
end
test 'require no authentication tests current mapping' do