Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Generate config initializer when running inquiries generator. Closes #78

.
  • Loading branch information...
commit 665c6b01afebce76438f609d37e59d02947634fc 1 parent 32b64d4
@ugisozols ugisozols authored
View
6 lib/generators/refinery/inquiries/inquiries_generator.rb
@@ -1,5 +1,11 @@
module Refinery
class InquiriesGenerator < Rails::Generators::Base
+ source_root File.expand_path('../templates', __FILE__)
+
+ def generate_inquiries_initializer
+ template 'config/initializers/refinery/inquiries.rb.erb', File.join(destination_root, 'config', 'initializers', 'refinery', 'inquiries.rb')
+ end
+
def rake_db
rake("refinery_inquiries:install:migrations")
rake("refinery_settings:install:migrations")
View
4 lib/generators/refinery/inquiries/templates/config/initializers/refinery/inquiries.rb.erb
@@ -0,0 +1,4 @@
+Refinery::Inquiries.configure do |config|
+ # Configure whether to show privacy link
+ # config.self.show_contact_privacy_link = <%= Refinery::Inquiries.show_contact_privacy_link.inspect %>
+end
Please sign in to comment.
Something went wrong with that request. Please try again.