diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-26 16:55:08 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-03 22:09:33 +0200 |
commit | 64653a9149eca977c16233abb0a472730b94a464 (patch) | |
tree | 7cfd94c7a7cd44374cf88c61f0f7bd926c351615 /app/controllers/switchboard_entries_controller.rb | |
parent | 877364c24ef9c7954f0e193456bb3f2d39169977 (diff) |
Store reload interval in the Switchboard table.
Diffstat (limited to 'app/controllers/switchboard_entries_controller.rb')
-rw-r--r-- | app/controllers/switchboard_entries_controller.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/switchboard_entries_controller.rb b/app/controllers/switchboard_entries_controller.rb index 32ca9bb..3f82976 100644 --- a/app/controllers/switchboard_entries_controller.rb +++ b/app/controllers/switchboard_entries_controller.rb @@ -3,8 +3,17 @@ class SwitchboardEntriesController < ApplicationController authorize_resource :switchboard_entry, :through => :switchboard, :except => [:sort] def index - @switchboard_entries = @switchboard.switchboard_entries - spread_breadcrumbs + 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 end def show |