lib/formtastic/helpers/inputs_helper.rb in formtastic-3.1.0 vs lib/formtastic/helpers/inputs_helper.rb in formtastic-3.1.1
- old
+ new
@@ -336,11 +336,11 @@
end
# Collects association columns (relation columns) for the current form object class. Skips
# polymorphic associations because we can't guess which class to use for an automatically
# generated input.
- def association_columns(*by_associations) #:nodoc:
+ def association_columns(*by_associations) # @private
if @object.present? && @object.class.respond_to?(:reflections)
@object.class.reflections.collect do |name, association_reflection|
if by_associations.present?
if by_associations.include?(association_reflection.macro) && association_reflection.options[:polymorphic] != true
name
@@ -353,11 +353,11 @@
[]
end
end
# Collects content columns (non-relation columns) for the current form object class.
- def content_columns #:nodoc:
+ def content_columns # @private
# TODO: NameError is raised by Inflector.constantize. Consider checking if it exists instead.
begin klass = model_name.constantize; rescue NameError; return [] end
return [] unless klass.respond_to?(:content_columns)
klass.content_columns.collect { |c| c.name.to_sym }.compact
end
@@ -365,11 +365,11 @@
# Deals with :for option when it's supplied to inputs methods. Additional
# options to be passed down to :for should be supplied using :for_options
# key.
#
# It should raise an error if a block with arity zero is given.
- def inputs_for_nested_attributes(*args, &block) #:nodoc:
+ def inputs_for_nested_attributes(*args, &block) # @private
options = args.extract_options!
args << options.merge!(:parent => { :builder => self, :for => options[:for] })
fields_for_block = if block_given?
raise ArgumentError, 'You gave :for option with a block to inputs method, ' <<
@@ -394,10 +394,10 @@
fields_for_args = [options.delete(:for), options.delete(:for_options) || {}].flatten(1)
fields_for(*fields_for_args, &fields_for_block)
end
- def field_set_title_from_args(*args) #:nodoc:
+ def field_set_title_from_args(*args) # @private
options = args.extract_options!
options[:name] ||= options.delete(:title)
title = options[:name]
if title.blank?