Sha256: 2a998c2a2bf4b2de9125b29e997142b2be7496bbabaf19b31dc290a0c316599a

Contents?: true

Size: 333 Bytes

Versions: 11

Compression:

Stored size: 333 Bytes

Contents

module Cms
  module FormBuilder
    module DefaultInput

      # Use a default value if there isn't one specfied already.
      def extract_default
        if options[:default] && object.new_record? && object.send(attribute_name).blank?
          input_html_options[:value] = options[:default]
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
browsercms-artirix-4.0.4 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.3.3 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.3.2 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.3.1 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.3 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.2 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.1.1 lib/cms/form_builder/default_input.rb
browsercms-artirix-4.0.0.rc1.art4 lib/cms/form_builder/default_input.rb
browsercms-4.0.0.rc1 lib/cms/form_builder/default_input.rb
browsercms-4.0.0.beta lib/cms/form_builder/default_input.rb
browsercms-4.0.0.alpha lib/cms/form_builder/default_input.rb