module Zobi::Inherited::Hidden

Protected Instance Methods

permitted_params() click to toggle source

This method can be overwritted in controllers

# File lib/zobi/inherited.rb, line 73
def permitted_params
  @permitted_params ||= parameters_class.new(self, params).params
end

Private Instance Methods

parameters_class() click to toggle source
# File lib/zobi/inherited.rb, line 79
      def parameters_class
        klass = "#{self.class.to_s.sub('Controller', '').singularize}Parameters"
        klass.constantize
      rescue NameError
        raise <<EOT
You need to define the class #{klass} or overwrite the permitted_params method in your controller.
EOT
      end