permitters/permitters — pull request #2 by alexpeattie (2013-10-15 08:23:52+00:00)
Title: Allow permitters to be used without a current_user method

First of all, thanks for this awesome gem :+1:

At the moment, permitters won't work unless the app has a `current_user` method defined:

~~~
undefined local variable or method `current_user' for #
permitters (0.0.1) lib/action_controller/permittance.rb:18:in `permitter'
permitters (0.0.1) lib/action_controller/permittance.rb:6:in `permitted_params'
~~~

Defining an empty `current_user` method fixes the problem:

~~~ruby
class ApplicationController < ActionController::Base
def current_user
end
end
~~~

But this patch should allow an app without a `current_user` method to use permitters.

Thanks!

Alex