Sha256: 0d911c46e6498dfec7cd55c57723ec5c06061ce3ab80a8f973fb879bf30fbb46

Contents?: true

Size: 935 Bytes

Versions: 31

Compression:

Stored size: 935 Bytes

Contents

class App.Models.User extends App.Models.Base
  @identity = "User"
  @resources =
    url: "/users"
    admin:
      url: "/admin/users"

  @paginate = {per: 10}

  @attributes =
    email:
      validations:
        presence: true
        format: {with: /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i}
    username:
      validations:
        presence: true
        format: {with: /^[a-z][a-z0-9_\-]*$/i}
    password:
      validations:
        presence: {on: "create"}
        confirmation: true
    passwordConfirmation:
      remoteName: "password_confirmation"
    confirmed: {}
    createdAt:
      type: "Date"
      remoteName: "created_at"
    updatedAt:
      type: "Date"
      remoteName: "updated_at"

  @receivedSignal: (signal, data) -> console.log "App.Models.User.receivedSignal: #{signal}"

  constructor: (data) -> super data

  receivedSignal: (signal, data) -> console.log "App.Models.User#receivedSignal: #{signal}"

Version data entries

31 entries across 27 versions & 1 rubygems

Version Path
loco-rails-3.0.3 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-3.0.3 test/dummy/node_modules/loco-js/spec_coffee/dummy/models/user.coffee
loco-rails-2.5.3 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.5.2 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-3.0.2 test/dummy/node_modules/loco-js/spec_coffee/dummy/models/user.coffee
loco-rails-3.0.2 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-3.0.1 test/dummy/node_modules/loco-js/spec_coffee/dummy/models/user.coffee
loco-rails-3.0.1 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.5.1 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.5.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.4.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.3.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-3.0.0 test/dummy/node_modules/loco-js/spec_coffee/dummy/models/user.coffee
loco-rails-3.0.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.2.2 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.2.1 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.2.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.1.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-2.0.0 test/dummy/app/assets/javascripts/models/user.coffee
loco-rails-1.5.2 test/dummy/app/assets/javascripts/models/user.coffee