class Blacklight::ModelsGenerator
Public Instance Methods
Source
# File lib/generators/blacklight/models_generator.rb, line 30 def add_routes route <<-EOF concern :exportable, Blacklight::Routes::Exportable.new resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do concerns :exportable end resources :bookmarks, only: [:index, :update, :create, :destroy] do concerns :exportable collection do delete 'clear' end end EOF end
Source
# File lib/generators/blacklight/models_generator.rb, line 26 def copy_migrations rake "blacklight:install:migrations" end
Setup the database migrations
Source
# File lib/generators/blacklight/models_generator.rb, line 20 def create_configuration_files copy_file "config/blacklight.yml", "config/blacklight.yml" gsub_file 'config/blacklight.yml', '__VERSION__', Blacklight::VERSION end
Copy all files in templates/config directory to host config