Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Clean up whitespace in README and mention that it also works with Zepto. #1

Merged
merged 1 commit into from Nov 30, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -5,7 +5,7 @@ http://workshops.thoughtbot.com/backbone-js-on-rails


The book contains complete instructions and in-depth coverage of the internals The book contains complete instructions and in-depth coverage of the internals
of CompositeView and Swappingrouter, and an example application that shows of CompositeView and Swappingrouter, and an example application that shows
their usage their usage.


### SwappingRouter ### SwappingRouter


Expand All @@ -24,7 +24,7 @@ view by rendering that view into its own `el`:
if (this.currentView && this.currentView.leave) { if (this.currentView && this.currentView.leave) {
this.currentView.leave(); this.currentView.leave();
} }

this.currentView = newView; this.currentView = newView;
this.currentView.render(); this.currentView.render();
$(this.el).empty().append(this.currentView.el); $(this.el).empty().append(this.currentView.el);
Expand Down Expand Up @@ -74,7 +74,7 @@ maintain a back-reference at `this.parent`. This is used to reach up and call


You'll need these, but chances are you already have them in your app: You'll need these, but chances are you already have them in your app:


* jQuery * jQuery or Zepto
* Underscore * Underscore
* Backbone * Backbone


Expand Down Expand Up @@ -131,7 +131,7 @@ First off:
In your `config/application.rb`: In your `config/application.rb`:


``` ruby ``` ruby
config.middleware.use Rack::Static, config.middleware.use Rack::Static,
:urls => ['/vendor/plugins/backbone-support/lib/assets/javascripts'] :urls => ['/vendor/plugins/backbone-support/lib/assets/javascripts']
``` ```


Expand All @@ -157,7 +157,6 @@ end
Your individual specs will then need the full root path in `require`. For Your individual specs will then need the full root path in `require`. For
example: example:



``` js ``` js
requirePublic = function(path) { requirePublic = function(path) {
require("/public/javascripts/" + path); require("/public/javascripts/" + path);
Expand Down