Class: Refinery::BookingsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Refinery::BookingsGenerator
- Defined in:
- lib/generators/refinery/bookings/bookings_generator.rb
Instance Method Summary collapse
- #append_load_seed_data ⇒ Object
-
#rake_db ⇒ Object
def generate_bookings_initializer template “config/initializers/refinery/bookings.rb.erb”, File.join(destination_root, “config”, “initializers”, “refinery”, “bookings.rb”) end.
Instance Method Details
#append_load_seed_data ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/generators/refinery/bookings/bookings_generator.rb', line 14 def append_load_seed_data create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb')) append_file 'db/seeds.rb', :verbose => true do <<-EOH # Added by Refinery CMS Bookings extension Refinery::Bookings::Engine.load_seed EOH end end |
#rake_db ⇒ Object
def generate_bookings_initializer
template "config/initializers/refinery/bookings.rb.erb", File.join(destination_root, "config", "initializers", "refinery", "bookings.rb")
end
10 11 12 |
# File 'lib/generators/refinery/bookings/bookings_generator.rb', line 10 def rake_db rake("refinery_bookings:install:migrations") end |