Sha256: 716f328b15b3cac26cdab1a8879699220e8a1bff7ee35a909613c62784bcd27f

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

# coding: UTF-8
module Rescue
  module Controller
    class Parameter

      def self.define object
        id = Rescue.config.primary_key
        object.send(:define_method, :find_params) do
          params.require(id)
          params.permit(id)
        end
        object.send(:private, :find_params)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rescue-dog-0.3.2 lib/rescue/controllers/parameter.rb
rescue-dog-0.3.1 lib/rescue/controllers/parameter.rb
rescue-dog-0.3.0 lib/rescue/controllers/parameter.rb