app/controllers/administrator/user_controller.rb
# NOTE - these are here for convenience; when an admin is looking at the users view, they want to quickly be able to
# grant or remove curatorship.  The curator controller is more detailed.
these are here for convenience; when an admin is looking at the users view, they want to quickly be able to
grant or remove curatorship.  The curator controller is more detailed.
these are here for convenience ; when an admin is looking at the users view they want to quickly be able to grant or remove curatorship . The curator controller is more detailed .
def grant_curator
    @user = User.find(params[:id])
    @user.grant_curator(:full, by: current_user)
    respond_to do |format|
      format.html {
        redirect_to '/administrator/curator', status: :moved_permanently
      }
      format.js {
        render partial: 'administrator/curator/user_row', locals: {column_class: params[:class] || 'odd', user: @user}
      }
    end
  end
def grant_curator @user = User . find ( params [ :id ] ) @user . grant_curator ( :full , by : current_user ) respond_to do | format | format . html { redirect_to '/administrator/curator' , status : :moved_permanently } format . js { render partial : 'administrator/curator/user_row' , locals : { column_class : params [ :class ] || 'odd' , user : @user } } end end
NOTE - these are here for convenience; when an admin is looking at the users view, they want to quickly be able to
grant or remove curatorship.
NOTE - these are here for convenience ; when an admin is looking at the users view they want to quickly be able to grant or remove curatorship .