From 3f25173842a63ac5b2f10be16612a20d07e51dca Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Tue, 14 Mar 2017 14:42:17 -0400 Subject: [PATCH] Replacing browse_everything with browse_everything? ```console DEPRECATION WARNING: browse_everything is deprecated and will be removed from a future release (use browse_everything? instead). ``` --- app/views/hyrax/base/_form_files.html.erb | 2 +- spec/views/hyrax/base/_form.html.erb_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/hyrax/base/_form_files.html.erb b/app/views/hyrax/base/_form_files.html.erb index 72312f107b..5dd4a57a2d 100644 --- a/app/views/hyrax/base/_form_files.html.erb +++ b/app/views/hyrax/base/_form_files.html.erb @@ -45,7 +45,7 @@ <%= render 'hyrax/uploads/js_templates' %> -<% if Hyrax.config.browse_everything %> +<% if Hyrax.config.browse_everything? %>

<%= t('hyrax.base.form_files.external_upload') %>

<%= render 'browse_everything', f: f %> <% end %> diff --git a/spec/views/hyrax/base/_form.html.erb_spec.rb b/spec/views/hyrax/base/_form.html.erb_spec.rb index 734d40595e..e9aaf1fd3f 100644 --- a/spec/views/hyrax/base/_form.html.erb_spec.rb +++ b/spec/views/hyrax/base/_form.html.erb_spec.rb @@ -29,7 +29,7 @@ let(:work) { GenericWork.new } context 'with browse-everything disabled (default)' do before do - allow(Hyrax.config).to receive(:browse_everything) { nil } + allow(Hyrax.config).to receive(:browse_everything?) { nil } end it "draws the page" do expect(page).to have_selector("form[action='/concern/generic_works']") @@ -44,7 +44,7 @@ context 'with browse-everything enabled' do before do - allow(Hyrax.config).to receive(:browse_everything) { 'not nil' } + allow(Hyrax.config).to receive(:browse_everything?) { 'not nil' } end it 'renders the BE upload widget' do expect(page).to have_selector('button#browse-btn')