module Magic::EmptyText

Public Class Methods

included(base) click to toggle source
# File lib/extmodules/magic.rb, line 92
def self.included(base)
  base.class_eval do

    alias_method :mod_empty_text, :prepare_config

    define_method :prepare_config do
      mod_empty_text rescue "skip"
      text = @config[:fieldLabel] || @default_config[:fieldLabel]
      @default_config.merge! :emptyText => "Select #{text}" unless text.nil?
    end

  end
end