Skip to content

dmcaulay/parsebackbone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a hack that uses parse.com for persistence and backbone-rails for the view layer.

running on heroku here http://fierce-ice-1746.heroku.com/

if you want to get this working you'll need to add parse.rb to your initializers directory.

Parsebackbone::Application.config.parse_base_url = 'https://api.parse.com/1/classes/'
Parsebackbone::Application.config.parse_app_id = 'your application id'
Parsebackbone::Application.config.parse_master_key = 'your master key'

you can generate backbone models using the backbone-rails scaffold generator.
rails g backbone:scaffold Post title:string content:string

i was originally hoping you wouldn't have to do anything after the generator, but you still have to add an idAttribute to your model.
idAttribute: 'objectId'

and you need to change the links next to your model in the model.jst.ejs file because id is no longer valid.
<td><a href="#/<%= objectId %>">Show</td>
<td><a href="#/<%= objectId %>/edit">Edit</td>
<td><a href="#/<%= objectId %>/destroy" class="destroy">Destroy</a></td>

About

using parse for persistence in a rails/backbone.js project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published