Sha256: a56f1ff34e88b87e64c8c79de986f9e90896eae6563ee1668c7a0e2ad68eaed7
Contents?: true
Size: 1.32 KB
Versions: 16
Compression:
Stored size: 1.32 KB
Contents
class SixconfigsController < ApplicationController record_select :per_page => 10, :search_on => "name", :order_by => "name ASC", :full_text_search => true active_scaffold :sixconfigs do |config| config = self # Ruby19 compatibility config.label = "Presets" config.columns = [ :name, :mods, :server, :appsetting, :action, # :created_at, :updated_at, :exec ] config.columns[:appsetting].label = "Settings Profile" #config.action_links.add 'exec', :label => 'Execute', :type => :record, :position => false, :confirm => "Do you really want to *execute* this item?" config.action_links.add 'copy', :label => 'Clone', :type => :record, :position => false, :confirm => "Do you really want to *clone* this item?" config.columns[:exec].label = "Run" config.list.sorting = { :name => :asc } config.update.columns.exclude :exec config.create.columns.exclude :exec [:mods, :server, :appsetting, :action].each do |c| config.columns[c].form_ui = :record_select end [:name].each do |column| config.columns[column].inplace_edit = true end end def copy t = copy_ll(Kernel.const_get(self.controller_name.singularize.camelize), [:mods]) @original_record = t[0] @record = t[1] end end
Version data entries
16 entries across 16 versions & 1 rubygems