Skip to content

Commit

Permalink
Updates README to reflect how things work in Rails 3+.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardo committed Dec 8, 2011
1 parent d85375c commit ed7b169
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions dryml/README
Expand Up @@ -9,24 +9,28 @@ not optimized for that and you may end up with extra carriage returns.
DRYML was created for the Hobo project, but this is an extraction from
that project and can be used separately.

# How to use with Rails but without Hobo
# How to use with Rails 3 but without Hobo

- install both HoboSupport and Dryml as a plugin or gem
- Declare the Dryml gem in your `Gemfile`

gem 'dryml'

- create an `application.dryml`
- Then update your bundle

$ bundle install

- Create an `application.dryml`

$ mkdir app/views/taglibs
$ touch app/views/taglibs/application.dryml

- create `config/initializers/dryml.rb`

require 'dryml'
require 'dryml/template'
require 'dryml/dryml_generator'
Dryml.enable
Now you can use templates that end in ".dryml" or ".html.dryml". Controller
layouts will still be rendered and will enclose your templates, but you can
disable them if you wish in your ApplicationController:

Now you can use templates that end in ".dryml". Such templates will
ignore layouts.
class ApplicationController < ActionController::Base
layout nil
end

# How to use outside of Rails

Expand Down

0 comments on commit ed7b169

Please sign in to comment.