From 8b50f89ba7076a62595d040f1512859c287c2d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 21 Mar 2010 19:30:42 +0100 Subject: Make ERB generators more flexible and customizable. --- railties/lib/generators/erb.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'railties/lib/generators/erb.rb') diff --git a/railties/lib/generators/erb.rb b/railties/lib/generators/erb.rb index d468d012dc..3e6371268f 100644 --- a/railties/lib/generators/erb.rb +++ b/railties/lib/generators/erb.rb @@ -3,6 +3,19 @@ require 'rails/generators/named_base' module Erb module Generators class Base < Rails::Generators::NamedBase #:nodoc: + protected + + def format + :html + end + + def handler + :erb + end + + def filename_with_extensions(name) + [name, format, handler].compact.join(".") + end end end end -- cgit v1.2.3