src/jquery.o_O.rails.js in eyeballs-0.3.4.1 vs src/jquery.o_O.rails.js in eyeballs-0.3.5

- old
+ new

@@ -52,12 +52,17 @@ url: '/' + object.table_name + '/' + object.id, success: respond }) } }, - find: function(model, id, callback) + find: function(model, id, callback, options) { - $.get('/' + model.table_name + '/' + id, function(response){ + var url = '/' + model.table_name + '/' + id; + if(typeof options === 'object' && options.prefix) + { + url = options.prefix + url; + } + $.get(url, function(response){ var retrieved_object = JSON.parse(response); if(typeof callback === 'function') { retrieved_object.new_record = false; callback(retrieved_object);