o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1337094664.7041512: @value"U{I" class:EFI"ProcessedAsset;FI"logical_path;F"ems/models/article.jsI" pathname;F"j/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/models/article.coffeeI"content_type;FI"application/javascript;FI" mtime;FI"2012-05-15T16:11:02+01:00;FI" length;Fi I" digest;F"%289251f72a932e10beacdad0ca1a05e5I" source;FI" (function() { var __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; }; Ems.Article = (function(_super) { __extends(Article, _super); Article.name = 'Article'; function Article() { return Article.__super__.constructor.apply(this, arguments); } Article.storageKey = 'articles'; Article.persist(Batman.RailsStorage); Article.resourceName = 'article'; Article.url = "/ems/articles"; Article.hasOne('category', { saveInline: false, autoload: false }); Article.hasMany('channels', { saveInline: false, autoload: false }); Article.hasMany('tags', { saveInline: false, autoload: false }); Article.hasMany('articles', { saveInline: false, autoload: false }); Article.hasMany('reports', { saveInline: false, autoload: false }); Article.hasMany('news', { saveInline: false, autoload: false }); Article.prototype.channel_ids = null; Article.prototype.tag_ids = null; Article.prototype.selectedChannels = null; Article.prototype.availableStatus = null; Article.encode('id', 'slug', 'title', 'standfirst', 'content', 'hot', "featured", "toc", "comment", "meta_title", "meta_description", "publish_from", "status", "content_disposition", "created_at", "updated_at", "image"); Article.encode("publish_from", "created_at", "updated_at", Batman.Encoders.railsDate); Article.encode('channel_ids', { encode: function(channelIds, name, object, article) { var channel, channels, _i, _len, _ref; channelIds || (channelIds = []); channels = article.get('channels'); if (channels) { _ref = channels.toArray(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { channel = _ref[_i]; channelIds.push(channel.id); } } return channelIds; } }); Article.encode('tag_ids', { encode: function(tagIds, name, object, article) { var tag, tags, _i, _len, _ref; tagIds || (tagIds = []); tags = article.get('tags'); if (tags) { _ref = tags.toArray(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { tag = _ref[_i]; tagIds.push(tag.id); } } return tagIds; } }); Article.accessor('title', { get: function() { return this.title; }, set: function(k, v) { this.set('meta_title', v); this.set('slug', v); this.title = v; return this.title; } }); Article.accessor('standfirst', { get: function() { return this.standfirst; }, set: function(k, v) { this.set('meta_description', v); this.standfirst = v; return this.standfirst; } }); Article.accessor('slug', { get: function() { return this.slug; }, set: function(k, v) { this.slug = this.sluggify(v); return this.standfirst; } }); Article.prototype.sluggify = function(text) { text = text.replace(/[^\-a-zA-Z0-9\s]/g, ""); text = text.toLowerCase(); return text = text.replace(/\s/g, '-'); }; return Article; })(Ems.Base); }).call(this); ;TI"dependency_digest;F"%4cb7b1e39227f56fc290f6b5143a8d27I"required_paths;F["j/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/models/article.coffeeI"dependency_paths;F[{I" path;F"j/private/var/www/html/development/projects/rails/ems/app/assets/javascripts/ems/models/article.coffeeI" mtime;FI"2012-05-15T16:11:02+01:00;FI" digest;F"%3949ec98a85a6084a2e4a677b051c654I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862