o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364984302.989546: @value"ñ{I" class:EFI"ProcessedAsset;FI"logical_path;FI"locomotive/slugify.js;TI" pathname;FI"]/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/slugify.js;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-04-03T11:01:13+02:00;FI" length;Fi»I" digest;F"%fb6b5bed0c896d55c7f12c80832fcff9I" source;FI"»/** * Version 0.0.1 * Fill in an input field from another one (source) * and apply a filter on the string (slugify) * Didier Lafforgue */ $.fn.slugify = function(settings) { settings = $.extend({ sep: '-', url: null, underscore: false }, settings); var target = $(settings.target); target.data('touched', (target.val() != '')); var makeSlug = function(event) { var source = $(this); if (settings.url != null) { // Ajax call instead meaning rely on the server to get the slugified version of the field params = { 'string': source.val(), 'underscore': (settings.underscore ? '1' : '0') }; jQuery.getJSON(settings.url, params, function(data, textStatus, jqXHR) { var newVal = data['value'] if (!target.data('touched')) { target.val(newVal); target.trigger('change'); } }); } else { var newVal = source.val().slugify(settings.sep); if (!target.data('touched')) { target.val(newVal); target.trigger('change'); } } } target.bind('keyup', function(event) { $(this).data('touched', ($(this).val() != '')); }); return $(this).bind('keyup', makeSlug); }; ;FI"dependency_digest;F"%b74cceb59dab2175da2eeadcbb755941I"required_paths;F[I"]/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/slugify.js;TI"dependency_paths;F[{I" path;FI"]/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/slugify.js;TI" mtime;FI"2013-04-03T11:01:13+02:00;FI" digest;F"%de8c1c755db5c188738f5b6435d4c4b9I" _version;F"%6776f581a4329e299531e1d52aa59832