Sha256: 6d5702023960345b30c2cadd6d887c0beff9bbbb045894d6a2114b50fd245584
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
Contents
This works with Rails 3.2 and ActiveScaffold >= 3.4.4 Version 3.2.x worked with Rails 3.2 and ActiveScaffold >= 3.3.0 Usage: active_scaffold :model do |conf| conf.actions.add :config_list end Overview A plugin for Active Scaffold that provides the ability to choose the column to show in the scaffold list at run-time The configuration data will be saved on the session. It can be saved on the DB defining a method to return a record for current controller, or empty record if user has no list configuration, and setting config_list to use that method. conf.config_list.save_to_user = :config_list_for class User < ActiveRecord::Base has_many :list_configurations def config_list_for(controller_id, controller_name) list_configurations.where(:controller_id => controller_id).first_or_initialize # different columns on different nested or embedded conditions list_configurations.where(:controller_id => controller_name).first_or_initialize # one configuration for the controller, even embedded or nested end end The model storing list configuration must have a config_list text column storing the config list, and config_list_sort serialized text column.
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
active_scaffold_config_list-3.3.3 | README |
active_scaffold_config_list-3.3.2 | README |
active_scaffold_config_list-3.3.1 | README |
active_scaffold_config_list-3.3.0 | README |