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