Class: Goldberg::SystemSettingsController

Inherits:
ApplicationController show all
Includes:
Controller
Defined in:
lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb

Instance Method Summary collapse

Methods included from Controller

included

Methods included from Six::Import::Controller::ClassMethods

#copy, #six_local_auto_login

Methods inherited from ActionController::Base

#active_scaffold_render_secure_download, #assign_names_with_active_scaffold, #render_with_active_scaffold, #search_generic_view_paths?

Instance Method Details

#createObject



34
35
36
37
38
39
40
41
42
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 34

def create
  @system_settings = SystemSettings.new(params[:system_settings])
  if @system_settings.save
    flash[:notice] = 'SystemSettings was successfully created.'
    redirect_to :action => 'list'
  else
    render :action => 'new'
  end
end

#destroyObject



60
61
62
63
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 60

def destroy
  SystemSettings.find(params[:id]).destroy
  redirect_to :action => 'list'
end

#editObject



44
45
46
47
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 44

def edit
  foreign()
  @system_settings = SystemSettings.find(params[:id])
end

#indexObject



5
6
7
8
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 5

def index
  list
  render :action => 'list'
end

#listObject



14
15
16
17
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 14

def list
  @system_settings = SystemSettings.find(:first)
  redirect_to :action => :show, :id => @system_settings
end

#newObject



24
25
26
27
28
29
30
31
32
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 24

def new
  @system_settings = SystemSettings.find(:first)
  if @system_settings != nil
    redirect_to :action => :edit, :id => @system_settings.id
  else
    foreign()
    @system_settings = SystemSettings.new
  end
end

#showObject



19
20
21
22
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 19

def show
  foreign()
  @system_settings = SystemSettings.find(:first)
end

#updateObject



49
50
51
52
53
54
55
56
57
58
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb', line 49

def update
  @system_settings = SystemSettings.find(params[:id])
  if @system_settings.update_attributes(params[:system_settings])
    flash[:notice] = 'SystemSettings was successfully updated.'
    redirect_to :action => 'show', :id => @system_settings
  else
    foreign
    render :action => 'edit'
  end
end