Sha256: b4ed453ebe5af7e464793e821a8283b5df3af35dee9e67d97c7027ee620e0e7b

Contents?: true

Size: 271 Bytes

Versions: 17

Compression:

Stored size: 271 Bytes

Contents

class Collaboration < ActiveRecord::Base
  serialize :permissions, JSON

  belongs_to :collaborated, polymorphic: true
  belongs_to :user

  after_initialize :update_permissions

  private

  def update_permissions
    # initialize
    self.permissions ||= {}
  end

end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
lazy_crud-0.9.8.4 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.8.3 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.8.2 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.8.1 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.8.0 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.7.1 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.7 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.6 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.5 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.4 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.3 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.2 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.1 spec/support/rails_app/app/models/collaboration.rb
lazy_crud-0.9.0 spec/support/rails_app/app/models/collaboration.rb
authorizable-0.9.2 spec/support/rails_app/app/models/collaboration.rb
authorizable-0.9.1 spec/support/rails_app/app/models/collaboration.rb
authorizable-0.9.0 spec/support/rails_app/app/models/collaboration.rb