Class: Blacklight::SearchBuilderGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Blacklight::SearchBuilderGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/blacklight/search_builder_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_search_builder ⇒ Object
17 18 19 |
# File 'lib/generators/blacklight/search_builder_generator.rb', line 17 def create_search_builder template "search_builder.rb", "app/models/#{model_name}.rb" end |
#create_search_builder_spec ⇒ Object
21 22 23 24 25 |
# File 'lib/generators/blacklight/search_builder_generator.rb', line 21 def create_search_builder_spec return unless rspec_installed? template "search_builder_spec.rb", "spec/models/#{model_name}_spec.rb" end |