Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 25 additions and 21 deletions.
  1. +15 −11 dryml/README
  2. +10 −10 dryml/taglibs/core.dryml
View
26 dryml/README
@@ -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
View
20 dryml/taglibs/core.dryml
@@ -115,32 +115,32 @@ collection is considered blank)
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="html"><%=raw "<html#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</html>" -%></def>
+<def tag="html"><%=raw "<html#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</html>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="table"><%=raw "<table#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</table>" -%></def>
+<def tag="table"><%=raw "<table#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</table>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="a"><%=raw "<a#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</a>" -%></def>
+<def tag="a"><%=raw "<a#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</a>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="section"><%=raw "<section#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</section>" -%></def>
+<def tag="section"><%=raw "<section#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</section>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="header"><%=raw "<header#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</header>" -%></def>
+<def tag="header"><%=raw "<header#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</header>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="footer"><%=raw "<footer#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</footer>" -%></def>
+<def tag="footer"><%=raw "<footer#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</footer>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="form"><%=raw "<form#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</form>" -%></def>
+<def tag="form"><%=raw "<form#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</form>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="submit"><%=raw "<submit#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</submit>" -%></def>
+<def tag="submit"><%=raw "<submit#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</submit>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="input"><%=raw "<input#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</input>" -%></def>
+<def tag="input"><%=raw "<input#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</input>" -%></def>
<!-- nodoc. Define core HTML tags defined in Rapid so that DRYML can be used without Rapid. -->
-<def tag="link"><%=raw "<link#{tag_options(attributes, true)}>" -%><do param="default"/><%= "</link>" -%></def>
+<def tag="link"><%=raw "<link#{tag_options(attributes, true)}>" -%><do param="default"/><%= raw "</link>" -%></def>

No commit comments for this range

Something went wrong with that request. Please try again.