diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:08:19 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:09:33 +0200 |
commit | cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (patch) | |
tree | e216a9634c31047e8908a882aed9ff2545ed99e6 /app/controllers/switchboard_entries_controller.rb | |
parent | 64653a9149eca977c16233abb0a472730b94a464 (diff) |
Massive changes to the switchboard.
Diffstat (limited to 'app/controllers/switchboard_entries_controller.rb')
-rw-r--r-- | app/controllers/switchboard_entries_controller.rb | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/app/controllers/switchboard_entries_controller.rb b/app/controllers/switchboard_entries_controller.rb index 3f82976..ef6c72e 100644 --- a/app/controllers/switchboard_entries_controller.rb +++ b/app/controllers/switchboard_entries_controller.rb @@ -3,31 +3,13 @@ class SwitchboardEntriesController < ApplicationController authorize_resource :switchboard_entry, :through => :switchboard, :except => [:sort] def index - if @switchboard - @switchboard_entries = @switchboard.switchboard_entries - spread_breadcrumbs - else - @switchboard_entries = SwitchboardEntry.where(:id => params[:ids]) - end - - respond_to do |format| - format.html - format.json { render json: @switchboard_entries } - end + @switchboard_entries = @switchboard.switchboard_entries + spread_breadcrumbs end def show - if @switchboard - @switchboard_entry = @switchboard.switchboard_entries.find(params[:id]) - spread_breadcrumbs - else - @switchboard_entry = SwitchboardEntry.find(params[:id]) - end - - respond_to do |format| - format.html - format.json { render json: @switchboard_entry } - end + @switchboard_entry = @switchboard.switchboard_entries.find(params[:id]) + spread_breadcrumbs end def new |