Sha256: 8453e4cf77e004e0aa63c6ce05016760944b4ee7f329583af494355f377197f4

Contents?: true

Size: 622 Bytes

Versions: 12

Compression:

Stored size: 622 Bytes

Contents

window.Property = can.Model({
  findAll : 'GET <%= Rails.application.routes.url_helpers.server_path :format => :json %>'

  findOne : ('GET ' + unescape('<%= Rails.application.routes.url_helpers.server_property_path('{id}') %>'))

  update  : (id, new_value, callback) ->
    url = unescape('<%= Rails.application.routes.url_helpers.server_property_path('{id}') %>').replace('{id}', id)
    return $.post(url, {value: new_value}, callback, "json")

  init: () ->
    @validatePresenceOf ['key']
    @validatePresenceOf ['value']

}, {})


window.Property.prototype.alert = () ->
  alert('<%= I18n.t('alert.property') %>')

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rmails-0.2.5 app/assets/javascripts/models/property.coffee.erb
rmails-0.2.4 app/assets/javascripts/models/property.coffee.erb
rmails-0.2.3 app/assets/javascripts/models/property.coffee.erb
rmails-0.2.2 app/assets/javascripts/models/property.coffee.erb
rmails-0.2.1 app/assets/javascripts/models/property.coffee.erb
rmails-0.2.0 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.6 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.5 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.4 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.3 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.2 app/assets/javascripts/models/property.coffee.erb
rmails-0.1.1 app/assets/javascripts/models/property.coffee.erb