Skip to content

Commit

Permalink
more syntax highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
akzhan committed Aug 31, 2011
1 parent d9f55ec commit 9b8af35
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Installation

For automated installation in Rails, use the "jquery-rails" gem. Place this in your Gemfile:

gem 'jquery-rails', '>= 1.0.12'
```ruby
gem 'jquery-rails', '>= 1.0.12'
```

And run:

Expand All @@ -35,8 +37,10 @@ This next step depends on your version of Rails.

a. For Rails 3.1, add these lines to the top of your app/assets/javascripts/application.js file:

//= require jquery
//= require jquery_ujs
```javascript
//= require jquery
//= require jquery_ujs
```

b. For Rails 3.0, run this command (add `--ui` if you want jQuery UI):

Expand All @@ -53,7 +57,9 @@ Choose to overwrite jquery_ujs.js if prompted.*

Configure the following in your application startup file:

config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
```ruby
config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
```

Now the template helper `javascript_include_tag :defaults` will generate SCRIPT tags to load jQuery and rails.js.

Expand Down

0 comments on commit 9b8af35

Please sign in to comment.