Permalink
Browse files

editing a person works too

  • Loading branch information...
Chris Nelson
Chris Nelson committed May 28, 2012
1 parent 303712d commit 5c9649af5e80b019329d5534076dc6baed417d40
View
@@ -18,12 +18,15 @@ group :assets do
gem "haml_coffee_assets"
gem "jasmine-ajax"
+ gem "jasminerice-runner"
gem "backtastic", :path => ".."
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "jasminerice"
+gem "capybara-webkit"
+
gem "inherited_resources"
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
@@ -11,6 +11,7 @@ class Example.Routers.PeopleRouter extends Backbone.Router
routes:
"people/new": "newPerson"
"people/list": "showPeople"
+ "people/:id/edit": "editPerson"
showPeople: ->
@peopleView.render()
@@ -20,4 +21,7 @@ class Example.Routers.PeopleRouter extends Backbone.Router
person = new Example.Models.Person
@people.add person, silent: true
@editPersonView.edit(person)
+
+ editPerson: (id)->
+ @editPersonView.edit @people.get(id)
@@ -1,6 +1,6 @@
%ul
- for person in @collection.models
%li
- %a{href: '/people/#{person.id}'}= person.get("first_name")
+ %a{href: '#people/#{person.id}/edit'}= person.get("first_name")
%a{href: "#people/new"} Add Person
@@ -1,3 +1,7 @@
#= require application
+#= require jasminerice_reporter
#= require mock-ajax
-#= require_tree .
+#= require_tree .
+
+window.peopleJson = ""
+window.occupationsJson = ""

0 comments on commit 5c9649a

Please sign in to comment.