Closed cj closed 11 years ago
Hi,
So in your docs (https://github.com/inossidabile/protector#manual-checks-and-custom-actions) you have model.can?(:drink) # Checks if model can drink any field but when I do that I get wrong number of arguments (1 for 2) (I'm doing User.new.restrict!(current_user).can?(:view)) but if I do User.new.restrict!(current_user).can?(:view, false) things work as expected. Not sure what is going on as you have https://github.com/inossidabile/protector/blob/master/lib/protector/dsl.rb#L164 so it should work. Any ideas?
model.can?(:drink) # Checks if model can drink any field
wrong number of arguments (1 for 2)
User.new.restrict!(current_user).can?(:view)
User.new.restrict!(current_user).can?(:view, false)
Hi,
So in your docs (https://github.com/inossidabile/protector#manual-checks-and-custom-actions) you have
model.can?(:drink) # Checks if model can drink any field
but when I do that I getwrong number of arguments (1 for 2)
(I'm doingUser.new.restrict!(current_user).can?(:view)
) but if I doUser.new.restrict!(current_user).can?(:view, false)
things work as expected. Not sure what is going on as you have https://github.com/inossidabile/protector/blob/master/lib/protector/dsl.rb#L164 so it should work. Any ideas?