From db5804d1cfe4d6ba34311694c09d585dc707f08c Mon Sep 17 00:00:00 2001 From: Jonathan Kolyer Date: Tue, 15 Oct 2013 09:54:16 -0500 Subject: [PATCH] vrfs-768: changed url param for admin toggle to just admin; added h2 title with instructions for toggling --- admin/Gemfile | 2 +- admin/app/admin/music_session_history.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/Gemfile b/admin/Gemfile index 5e8705cd2..7d49040dd 100644 --- a/admin/Gemfile +++ b/admin/Gemfile @@ -79,7 +79,7 @@ end # gem 'capistrano' # To use debugger -# gem 'debugger' +gem 'debugger' group :development, :test do gem 'capybara' diff --git a/admin/app/admin/music_session_history.rb b/admin/app/admin/music_session_history.rb index 81b56bd03..69b5fe594 100644 --- a/admin/app/admin/music_session_history.rb +++ b/admin/app/admin/music_session_history.rb @@ -6,7 +6,7 @@ ActiveAdmin.register JamRuby::MusicSessionHistory, :as => 'Music Session History controller do def scoped_collection - if '1' == params['user_admin_eq'] + if params['admin'].blank? || '1' == params['admin'] @music_session_histories ||= end_of_association_chain .includes([:user, :band]) .order('created_at DESC') @@ -23,6 +23,7 @@ ActiveAdmin.register JamRuby::MusicSessionHistory, :as => 'Music Session History index :as => :block do |msh| div :for => msh do h3 "Session ##{msh.music_session_id}: #{msh.created_at.strftime('%b %d %Y, %H:%M')}" + h4 "(append URL with ?admin=0 to hide admin sessions)" columns do column do panel 'Session Details' do