Sha256: c539a0d2c73c0138671a460caec87d0236f049137169e2eca55c1e2f0b09159a

Contents?: true

Size: 475 Bytes

Versions: 11

Compression:

Stored size: 475 Bytes

Contents

# TODO: activemodel with validations
class ExvoAuth::Models::Sharing
  def self.create(attrs = {})
    new(attrs).save
  end

  protected
  
  def save
    if true
      cfs.post("/sharings", :query => { :document_id => attrs[:document_id], :sharing => { :email => attrs[:email], :user_uid => attrs[:user_uid] } })
    else
      # TODO: append errors on errors from cfs too.
    end
  end

  def cfs
    @cfs ||= Autonomous::Consumer.new(:app_id => Config.cfs_id)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
exvo-auth-0.13.0 lib/exvo_auth/models/sharing.rb
exvo-auth-0.12.2 lib/exvo_auth/models/sharing.rb
exvo-auth-0.12.1 lib/exvo_auth/models/sharing.rb
exvo-auth-0.12.0 lib/exvo_auth/models/sharing.rb
exvo-auth-0.11.2 lib/exvo_auth/models/sharing.rb
exvo-auth-0.11.1 lib/exvo_auth/models/sharing.rb
exvo-auth-0.11.0 lib/exvo_auth/models/sharing.rb
exvo-auth-0.10.4 lib/exvo_auth/models/sharing.rb
exvo-auth-0.10.3 lib/exvo_auth/models/sharing.rb
exvo-auth-0.10.2 lib/exvo_auth/models/sharing.rb
exvo-auth-0.10.1 lib/exvo_auth/models/sharing.rb