Sha256: c085c93df49da26e3c43a078f4a95a866cb45fd4843fa72aff708d4f771ae799
Contents?: true
Size: 954 Bytes
Versions: 35
Compression:
Stored size: 954 Bytes
Contents
module ActiveScaffold::Config class Mark < Base self.crud_type = :read # What kind of mark all mode to use: # * :search: de-/mark all records using current search conditions # * :page: de-/mark all records on current page cattr_accessor :mark_all_mode @@mark_all_mode = :search attr_accessor :mark_all_mode def initialize(core_config) super @mark_all_mode = self.class.mark_all_mode @core.model.send(:include, ActiveScaffold::MarkedModel) unless @core.model < ActiveScaffold::MarkedModel add_mark_column end protected def add_mark_column @core.columns.add :as_marked @core.columns[:as_marked].label = 'M' @core.columns[:as_marked].list_ui = :marked @core.columns[:as_marked].sort = false @core.list.columns = [:as_marked] + @core.list.columns.to_a unless @core.list.columns.include? :as_marked end undef_method :new_user_settings end end
Version data entries
35 entries across 35 versions & 1 rubygems