README in dryml-1.3.0 vs README in dryml-1.3.1
- old
+ new
@@ -7,27 +7,31 @@
(Which would be a bug, so please send test cases).
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`
+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:
- require 'dryml'
- require 'dryml/template'
- require 'dryml/dryml_generator'
- Dryml.enable
-
-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
Dryml.render("<html><%= this %></html>", {:this => something})