lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.0.1 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.0.2
- old
+ new
@@ -27,12 +27,17 @@
inject_into_file 'app/controllers/application_controller.rb', after: "include Blacklight::Controller" do
"\n include Spotlight::Controller\n"
end
end
- def add_catalog_mixin
- inject_into_file 'app/controllers/catalog_controller.rb', after: "include Blacklight::Catalog" do
- "\n include Spotlight::Catalog\n"
- end
+ def add_helper
+ copy_file "spotlight_helper.rb", "app/helpers/spotlight_helper.rb"
+ inject_into_class 'app/helpers/application_helper.rb', ApplicationHelper, " include SpotlightHelper"
+ end
+
+ def add_model_mixin
+ inject_into_file 'app/models/solr_document.rb', after: "include Blacklight::Solr::Document" do
+ "\n include Spotlight::SolrDocument\n"
+ end
end
end
end