Class: Iron::Generators::PagesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Iron::Generators::PagesGenerator
- Defined in:
- lib/generators/iron/pages/pages_generator.rb
Instance Method Summary collapse
- #add_routes ⇒ Object
- #create_controller ⇒ Object
- #create_views ⇒ Object
- #display_instructions ⇒ Object
Instance Method Details
#add_routes ⇒ Object
16 17 18 |
# File 'lib/generators/iron/pages/pages_generator.rb', line 16 def add_routes route "iron_pages" end |
#create_controller ⇒ Object
8 9 10 |
# File 'lib/generators/iron/pages/pages_generator.rb', line 8 def create_controller template "pages_controller.rb", "app/controllers/pages_controller.rb" end |
#create_views ⇒ Object
12 13 14 |
# File 'lib/generators/iron/pages/pages_generator.rb', line 12 def create_views template "show.html.erb", "app/views/pages/show.html.erb" end |
#display_instructions ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/generators/iron/pages/pages_generator.rb', line 20 def display_instructions say "\n=== Iron CMS Pages Setup Complete ===\n", :green say "The pages controller has been installed in your application.\n" say "\nNext steps:" say "1. Create custom views for your content types in app/views/templates/" say " For a content type with handle 'article', create:" say " - app/views/templates/article.html.erb" say "\n2. The default view (app/views/pages/show.html.erb) will be used" say " for any content types without custom views." say "\n3. The iron_entry_path helper is available from the Iron engine." say "\n4. Remember to restart your Rails server after installation." end |