Sha256: 37440b5b6b7629f834f6ae8d099836aa252c99ddb9f32a444758469454aaa8ff

Contents?: true

Size: 516 Bytes

Versions: 3

Compression:

Stored size: 516 Bytes

Contents

begin
  if Rails.version >= '4'
    require 'action_controller/metal/strong_parameters'
  else
    require 'action_controller/parameters'
  end
rescue LoadError
  raise Zertico::Exceptions::MissingStrongParameters
end

module Zertico
  class PermittedParams < Delegator
    alias_method :params, :interface
    
    def self.interface_class
      name.chomp('PermittedParams').singularize.constantize
    rescue NameError
      name.chomp('PermittedParams').split('::').last.singularize.constantize
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zertico-2.0.0.alpha.3 lib/zertico/permitted_params.rb
zertico-2.0.0.alpha.2 lib/zertico/permitted_params.rb
zertico-2.0.0.alpha.1 lib/zertico/permitted_params.rb