aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/generators/refinery/blog/blog_generator.rb6
-rw-r--r--lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb15
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/generators/refinery/blog/blog_generator.rb b/lib/generators/refinery/blog/blog_generator.rb
index 6c0a604..a9a54da 100644
--- a/lib/generators/refinery/blog/blog_generator.rb
+++ b/lib/generators/refinery/blog/blog_generator.rb
@@ -1,6 +1,12 @@
module Refinery
class BlogGenerator < Rails::Generators::Base
+ source_root File.expand_path("../templates", __FILE__)
+
+ def generate_blog_initializer
+ template "config/initializers/refinery/blog.rb.erb", File.join(destination_root, "config", "initializers", "refinery", "blog.rb")
+ end
+
def rake_db
rake("refinery_blog:install:migrations")
end
diff --git a/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb b/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb
new file mode 100644
index 0000000..8a2bc8e
--- /dev/null
+++ b/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb
@@ -0,0 +1,15 @@
+Refinery::Blog.configure do |config|
+ # config.validate_source_url = <%= Refinery::Blog.validate_source_url.inspect %>
+
+ # config.comments_per_page = <%= Refinery::Blog.comments_per_page.inspect %>
+
+ # config.posts_per_page = <%= Refinery::Blog.posts_per_page.inspect %>
+
+ # config.post_teaser_length = <%= Refinery::Blog.post_teaser_length.inspect %>
+
+ # config.approximate_ascii = <%= Refinery::Blog.approximate_ascii.inspect %>
+
+ # config.strip_non_ascii = <%= Refinery::Blog.strip_non_ascii.inspect %>
+
+ # config.share_this_key = <%= Refinery::Blog.share_this_key.inspect %>
+end