Class: RailsAppGenerator::AddOns::Ransack
- Inherits:
-
RailsAppGenerator::Addon
- Object
- Rails::Generators::Base
- RailsAppGenerator::Addon
- RailsAppGenerator::AddOns::Ransack
- Defined in:
- lib/rails_app_generator/addons/ransack.rb
Overview
Add Ransack to rails application
Instance Attribute Summary
Attributes inherited from RailsAppGenerator::Addon
#context, #dependencies, #gem_entries
Instance Method Summary collapse
Methods inherited from RailsAppGenerator::Addon
addon_name, dependencies, depends_on, gem, gem_entries, #initialize, required_gem, reset_gem_entries
Constructor Details
This class inherits a constructor from RailsAppGenerator::Addon
Instance Method Details
#after_bundle ⇒ Object
29 30 31 |
# File 'lib/rails_app_generator/addons/ransack.rb', line 29 def after_bundle say 'Setting up Ransack - after bundle install' end |
#apply ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_app_generator/addons/ransack.rb', line 10 def apply say 'Setting up Ransack' # template('ransack_template.rb', 'target/ransack.rb', force: true) # template('app/javascript/stylesheets/components.scss') # create_file('target/ransack.rb', 'put your content here') # directory 'app/template', 'app/target', force: true # empty_directory 'app/target' # inject_into_file('app/application.js', "some content") # rails_command('tailwindcss:install') end |
#before_bundle ⇒ Object
25 26 27 |
# File 'lib/rails_app_generator/addons/ransack.rb', line 25 def before_bundle say 'Setting up Ransack - before bundle install' end |
#before_template ⇒ Object
21 22 23 |
# File 'lib/rails_app_generator/addons/ransack.rb', line 21 def before_template say 'Setting up Ransack - before custom template' end |