spec/support/lib/generators/test_app_generator.rb in hydra-collections-1.3.2 vs spec/support/lib/generators/test_app_generator.rb in hydra-collections-2.0.0
- old
+ new
@@ -4,11 +4,11 @@
source_root File.expand_path("../../../../support", __FILE__)
def run_blacklight_generator
say_status("warning", "GENERATING BL", :yellow)
- generate 'blacklight', '--devise'
+ generate "blacklight:install", '--devise'
end
def run_hydra_head_generator
say_status("warning", "GENERATING HH", :yellow)
@@ -66,6 +66,11 @@
insert_into_file "app/models/solr_document.rb", :after => 'include Blacklight::Solr::Document' do
"\n # Adds Collection behaviors to the SolrDocument.\n include Hydra::Collections::SolrDocumentBehavior"
end
end
+ def add_create_permissions
+ insert_into_file 'app/models/ability.rb', after: 'custom_permissions' do
+ "\n can :create, :all if user_groups.include? 'registered'\n"
+ end
+ end
end