lib/action_controller/permitter.rb
# When Permitter is inherited, it sets the resource (the symbol for params.require(some_sym)) to the unnamespaced model class that corresponds
# to the Permitter's classname, e.g. by default A::B::ApplesController will use A::B::ApplePermitter which will do params.permit(:apple).
# To change this value, use the `resource` class method.
When Permitter is inherited, it sets the resource (the symbol for params.require(some_sym)) to the unnamespaced model class that corresponds
to the Permitter's classname, e.g.
When Permitter is inherited it sets the resource ( the symbol for params . require ( some_sym )) to the unnamespaced model class that corresponds to the Permitter ' s classname e . g .
def resource_name
        name = self.name
        last_index = name.rindex('::')
        resource_name_override || (last_index ? name[(last_index+2)..-1] : name).chomp('Permitter').underscore.to_sym
      end
def resource_name name = self . name last_index = name . rindex ( '::' ) resource_name_override || ( last_index ? name [ ( last_index + 2 ) .. - 1 ] : name ) . chomp ( 'Permitter' ) . underscore . to_sym end
When Permitter is inherited, it sets the resource (the symbol for params.require(some_sym)) to the unnamespaced model class that corresponds
to the Permitter's classname, e.g.
When Permitter is inherited it sets the resource ( the symbol for params . require ( some_sym )) to the unnamespaced model class that corresponds to the Permitter ' s classname e . g .
# in Rails 3.2+ could do: # name.demodulize.chomp('Permitter').underscore.to_sym # Rails < 3.2