Sha256: 01d7451134d1325438f80de20d9ee97236d816225d7569fceeb892ff0e8eddac

Contents?: true

Size: 303 Bytes

Versions: 72

Compression:

Stored size: 303 Bytes

Contents

# If you want to use this concern, you need to add a boolean field 'draggable' to
# the model.
module Concerns
  module Draggable
    extend ActiveSupport::Concern

    included do
      after_initialize do
        self.draggable = true if self.new_record? && draggable.nil?
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
udongo-7.9.0 app/models/concerns/draggable.rb
udongo-7.8.1 app/models/concerns/draggable.rb
udongo-7.8.0 app/models/concerns/draggable.rb
udongo-7.7.2 app/models/concerns/draggable.rb
udongo-7.7.1 app/models/concerns/draggable.rb
udongo-7.7.0 app/models/concerns/draggable.rb
udongo-7.6.2 app/models/concerns/draggable.rb
udongo-7.6.1 app/models/concerns/draggable.rb
udongo-7.6.0 app/models/concerns/draggable.rb
udongo-7.5.1 app/models/concerns/draggable.rb
udongo-7.5.0 app/models/concerns/draggable.rb
udongo-7.4.2 app/models/concerns/draggable.rb
udongo-7.4.1 app/models/concerns/draggable.rb
udongo-7.4.0 app/models/concerns/draggable.rb
udongo-7.3.5 app/models/concerns/draggable.rb
udongo-7.3.4 app/models/concerns/draggable.rb
udongo-7.3.3 app/models/concerns/draggable.rb
udongo-7.3.2 app/models/concerns/draggable.rb
udongo-7.3.1 app/models/concerns/draggable.rb
udongo-7.2.1 app/models/concerns/draggable.rb