Sha256: aece57d690eb9b8dd271a4a1ff8ffb78c942ddda5036357eecd274d9b77742e8
Contents?: true
Size: 1.05 KB
Versions: 97
Compression:
Stored size: 1.05 KB
Contents
module ActiveScaffold::Config class Nested < Base self.crud_type = :read def initialize(core_config) @core = core_config self.shallow_delete = self.class.shallow_delete end # global level configuration # -------------------------- cattr_accessor :shallow_delete @@shallow_delete = false # instance-level configuration # ---------------------------- attr_accessor :shallow_delete # Add a nested ActionLink def add_link(label, models, options = {}) options.merge! :label => label, :type => :record, :security_method => :nested_authorized?, :position => :after, :parameters => {:associations => models.join(' ')} options[:html_options] ||= {} options[:html_options][:class] = [options[:html_options][:class], models.join(' ')].compact.join(' ') @core.action_links.add('nested', options) end # the label for this Nested action. used for the header. attr_writer :label def label @label ? as_(@label) : as_(:add_existing_model, :model => @core.label) end end end
Version data entries
97 entries across 97 versions & 2 rubygems