Skip to content

Commit

Permalink
Removing places where @@label_str_method appears.
Browse files Browse the repository at this point in the history
Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information
josevalim authored and justinfrench committed Mar 27, 2009
1 parent 41a6754 commit e057e23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/formtastic.rb
Expand Up @@ -78,7 +78,7 @@ def input(method, options = {})
raise NoMethodError.new("NoMethodError: form object does not respond to \"#{method}\"") unless @object.respond_to?(method)

options[:required] = method_required?(method, options[:required])
options[:label] ||= @object.class.human_attribute_name(method.to_s).send(@@label_str_method)
options[:label] ||= @object.class.human_attribute_name(method.to_s)
options[:as] ||= default_input_type(@object, method)

html_class = [
Expand Down Expand Up @@ -334,7 +334,7 @@ def save_or_create_commit_button_text #:nodoc:
prefix = @object.new_record? ? 'Create' : 'Save'
[ I18n.t(prefix.downcase, :default => prefix, :scope => [:formtastic]),
@object.class.human_name
].join(' ').send(@@label_str_method)
].join(' ')
end

# Determins if the attribute (eg :title) should be considered required or not.
Expand Down Expand Up @@ -639,7 +639,7 @@ def date_or_datetime_input(method, options)
list_items_capture << template.hidden_field_tag("#{@object_name}[#{method}(#{position[input]}i)]", (hidden_value || 1), :id => html_id)
else
opts = set_options(options).merge(:prefix => @object_name, :field_name => "#{method}(#{position[input]}i)")
item_label_text = I18n.t(input.to_s, :default => input.to_s, :scope => [:formtastic]).send(@@label_str_method)
item_label_text = I18n.t(input.to_s, :default => input.to_s, :scope => [:formtastic])

list_items_capture << template.content_tag(:li,
template.content_tag(:label, item_label_text, :for => html_id) +
Expand Down

0 comments on commit e057e23

Please sign in to comment.