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-1.1.1 lib/selections.rb
selections-1.0.5 lib/selections.rb
selections-1.0.4 lib/selections.rb
selections-1.1.0 lib/selections.rb
selections-1.0.3 lib/selections.rb
selections-1.0.2 lib/selections.rb
selections-1.0.1 lib/selections.rb
selections-1.0.0 lib/selections.rb
selections-0.2.2 lib/selections.rb
selections-0.2.1 lib/selections.rb
selections-0.1.14 lib/selections.rb
selections-0.1.13 lib/selections.rb
selections-0.1.12 lib/selections.rb
selections-0.1.11 lib/selections.rb
selections-0.1.7 lib/selections.rb
selections-0.1.6 lib/selections.rb
selections-0.1.5 lib/selections.rb
selections-0.1.4 lib/selections.rb
selections-0.1.3 lib/selections.rb
selections-0.1.2 lib/selections.rb