Class: ActiveFields::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveFields::Generators::InstallGenerator
- Defined in:
- lib/generators/active_fields/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/generators/active_fields/install/install_generator.rb', line 10 def create_initializer initializer "active_fields.rb", " ActiveFields.configure do |config|\n # Change fields base class:\n # config.field_base_class_name = \"CustomField\"\n # Change value class:\n # config.value_class_name = \"CustomValue\"\n\n # Register custom field type:\n # config.register_field :ip, \"IpField\"\n end\n RUBY\nend\n" |
#install_migrations ⇒ Object
24 25 26 |
# File 'lib/generators/active_fields/install/install_generator.rb', line 24 def install_migrations rails_command "active_fields:install:migrations" end |