Sha256: 767750a727e5e3b8ce89d82df33d2f17903aedd2af474878be299f1867055bff

Contents?: true

Size: 600 Bytes

Versions: 19

Compression:

Stored size: 600 Bytes

Contents

class Admin::CableSettingsController < AdminController
  
  def index
    @cable_setting = Cable::Setting.last || Cable::Setting.create(:site_title => Rails.application.class.parent.name.underscore.titleize )
  end
  
  def edit
    @cable_setting = Cable::Setting.last
  end  

  def update  
    @cable_setting = Cable::Setting.where( :id => params[:id]).first  
    if @cable_setting.update_attributes(params[:cable_setting])  
      flash[:notice] = "Successfully updated cable settings."  
      redirect_to admin_cable_settings_path
    else  
      render :action => 'edit'
    end  
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cable-0.9.17 app/controllers/admin/cable_settings_controller.rb
cable-0.9.16 app/controllers/admin/cable_settings_controller.rb
cable-0.9.15 app/controllers/admin/cable_settings_controller.rb
cable-0.9.14 app/controllers/admin/cable_settings_controller.rb
cable-0.9.13 app/controllers/admin/cable_settings_controller.rb
cable-0.9.12 app/controllers/admin/cable_settings_controller.rb
cable-0.9.11 app/controllers/admin/cable_settings_controller.rb
cable-0.9.10 app/controllers/admin/cable_settings_controller.rb
cable-0.9.9 app/controllers/admin/cable_settings_controller.rb
cable-0.9.8 app/controllers/admin/cable_settings_controller.rb
cable-0.9.6 app/controllers/admin/cable_settings_controller.rb
cable-0.9.5 app/controllers/admin/cable_settings_controller.rb
cable-0.9.4 app/controllers/admin/cable_settings_controller.rb
cable-0.9.3 app/controllers/admin/cable_settings_controller.rb
cable-0.9.1 app/controllers/admin/cable_settings_controller.rb
cable-0.9.0 app/controllers/admin/cable_settings_controller.rb
cable-0.8.6 app/controllers/admin/cable_settings_controller.rb
cable-0.8.5 app/controllers/admin/cable_settings_controller.rb
cable-0.8.4 app/controllers/admin/cable_settings_controller.rb