Skip to content

Commit

Permalink
Fix a bug where the template generators were not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
peakpg committed May 18, 2011
1 parent 56c114d commit 4f57054
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/generators/cms/template/template_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class TemplateGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)

def create_template
template 'template.erb', File.join('app/views/layouts/templates', "#{template_name}.html.erb")
template_dir = 'app/views/layouts/templates'
# empty_directory template_dir
template 'template.erb', File.join(template_dir, "#{template_name}.html.erb")
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/cms/template/templates/template.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<% require 'templates' -%>
<%= Templates.default_body %>
<% require 'cms/templates' -%>
<%= Cms::Templates.default_body %>

0 comments on commit 4f57054

Please sign in to comment.