Sha256: 86cda4d81e089b5f33247014707a7f66b5705dfaf50c1d5d3d212ca2aff7e1aa

Contents?: true

Size: 561 Bytes

Versions: 21

Compression:

Stored size: 561 Bytes

Contents

require 'selections/version'
require 'active_record'
require 'action_view'

module Selections

  require 'selections/belongs_to_selection'
  require 'selections/form_builder_extensions'
  require 'selections/selectable'

  # Given a block, will set how we find / detect the current model
  # used for selections, without a block, will return the value.
  # Note: Needed iff you are using a model other than Selection.
  def self.model(&block)
    if block
      @model = block
    else
      @model ||= lambda { Selection }
      @model.call
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
selections-0.1.1 lib/selections.rb