o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1384182735.985197: @value"H{I" class:ETI"ProcessedAsset;FI"logical_path;TI"&locomotive/models/custom_field.js;FI" pathname;TI"–/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.1/app/assets/javascripts/locomotive/models/custom_field.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-11-11T00:40:29+01:00;TI" length;Ti5 I" digest;TI"%67d6d192478d66c873cafddfd4138792;FI" source;TI"5 (function() { var _ref, _ref1, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; Locomotive.Models.CustomField = (function(_super) { __extends(CustomField, _super); function CustomField() { _ref = CustomField.__super__.constructor.apply(this, arguments); return _ref; } CustomField.prototype.initialize = function() { this._normalize(); if (this.get('name') == null) { return this.set({ name: this.get('label').slugify() }); } }; CustomField.prototype._normalize = function() { return this.set({ select_options: new Locomotive.Models.CustomFieldSelectOptionsCollection(this.get('select_options')) }); }; CustomField.prototype._undesired_fields = ['select_options', 'type_text', 'text_formatting_text', 'inverse_of_text', 'class_name_text', 'undefined_text', 'undefined', 'created_at', 'updated_at']; CustomField.prototype._relationship_fields = ['class_name', 'inverse_of', 'ui_enabled']; CustomField.prototype.is_relationship_type = function() { return _.include(['belongs_to', 'has_many', 'many_to_many'], this.get('type')); }; CustomField.prototype.toJSONForSave = function() { var _this = this; return _.tap({}, function(hash) { var key, value, _ref1; _ref1 = _this.toJSON(); for (key in _ref1) { value = _ref1[key]; if (!_.include(_this._undesired_fields, key)) { if (_.include(_this._relationship_fields, key)) { if (_this.is_relationship_type()) { hash[key] = value; } } else { hash[key] = value; } } } if ((_this.get('select_options') != null) && _this.get('select_options').length > 0) { return hash.select_options_attributes = _this.get('select_options').toJSONForSave(); } }); }; return CustomField; })(Backbone.Model); Locomotive.Models.CustomFieldsCollection = (function(_super) { __extends(CustomFieldsCollection, _super); function CustomFieldsCollection() { _ref1 = CustomFieldsCollection.__super__.constructor.apply(this, arguments); return _ref1; } CustomFieldsCollection.prototype.model = Locomotive.Models.CustomField; CustomFieldsCollection.prototype.toJSONForSave = function() { var _this = this; return this.map(function(model) { return model.toJSONForSave(); }); }; return CustomFieldsCollection; })(Backbone.Collection); }).call(this); ;TI"dependency_digest;TI"%bf70825d5494a84dd092c13c28afe997;FI"required_paths;T[I"–/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.1/app/assets/javascripts/locomotive/models/custom_field.js.coffee;FI"dependency_paths;T[{I" path;TI"–/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.1/app/assets/javascripts/locomotive/models/custom_field.js.coffee;FI" mtime;TI"2013-11-11T00:40:29+01:00;TI" digest;TI"%6c45a13e03f1176f835f6c65eda4360b;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F