Sha256: aa03538bb211bf858009ee2e0f5a5b1d7b66f8ae2d79d25945264ae66f92d62e

Contents?: true

Size: 1.1 KB

Versions: 96

Compression:

Stored size: 1.1 KB

Contents

class ServersController < ApplicationController
  record_select :per_page => 10, :search_on => "name", :order_by => "name ASC", :full_text_search => true
  active_scaffold :servers do |config|
    config = self # Ruby19 compatibility
    config.columns = [
      :name,
      :address,
      :port,
      :password,
      :sixconfigs,
      :mods,
#      :created_at,
      :updated_at,
      :remote,
      :exec3]

    config.list.sorting = { :name => :asc }
    config.create.columns.exclude :remote
    config.update.columns.exclude :remote
    config.list.columns.exclude :address, :port
    config.columns[:sixconfigs].label = "Presets"
    config.action_links.add 'copy', :label => 'Clone', :type => :record, :position => false, :confirm => "Do you really want to *clone* this item?"

    config.columns[:exec3].label = "Run"
    config.columns[:remote].label = "nfo"

    config.columns[:mods].form_ui = :record_select
    config.columns[:sixconfigs].form_ui = :record_select
    
    [:password].each do |column|
      config.columns[column].inplace_edit = true
    end
  end
end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
six-updater-web-0.24.15 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.14 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.13 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.12 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.11 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.10 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.9 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.8 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.7 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.6 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.5 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.4 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.3 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.2 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.1 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.24.0 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.23.7 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.23.6 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.23.5 lib/six-updater-web/app/controllers/servers_controller.rb
six-updater-web-0.23.4 lib/six-updater-web/app/controllers/servers_controller.rb