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