Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (7 sloc) 246 Bytes
var store = window.db['<%= data[:store] %>'];
var dataToInsert = JSON.parse(<%= data[:data].to_json.inspect %>);
store.add(dataToInsert).then(function(user_id) {
<%= success(js[:user_id]) %>
}).catch(function(err) {
<%= error(js[:err]) %>
})