Skip to content
Browse files

Rename classes

  • Loading branch information...
1 parent 801dcb0 commit 514308a49553e3a41c306d2df703ef7086ee054b @rafaelfranca rafaelfranca committed Jan 16, 2012
View
4 actionpack/lib/action_view/helpers/form_helper.rb
@@ -655,7 +655,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
# 'Accept <a href="/terms">Terms</a>.'.html_safe
# end
def label(object_name, method, content_or_options = nil, options = nil, &block)
- ActionView::Helpers::Tags::LabelTag.new(object_name, method, self, content_or_options, options).render(&block)
+ ActionView::Helpers::Tags::Label.new(object_name, method, self, content_or_options, options).render(&block)
end
# Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object
@@ -677,7 +677,7 @@ def label(object_name, method, content_or_options = nil, options = nil, &block)
# # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" />
#
def text_field(object_name, method, options = {})
- ActionView::Helpers::Tags::TextFieldTag.new(object_name, method, self, options).render
+ ActionView::Helpers::Tags::TextField.new(object_name, method, self, options).render
end
# Returns an input tag of the "password" type tailored for accessing a specified attribute (identified by +method+) on an object
View
6 actionpack/lib/action_view/helpers/tags.rb
@@ -1,9 +1,9 @@
module ActionView
module Helpers
module Tags
- autoload :BaseTag, 'action_view/helpers/tags/base_tag'
- autoload :LabelTag, 'action_view/helpers/tags/label_tag'
- autoload :TextFieldTag, 'action_view/helpers/tags/text_field_tag'
+ autoload :Base, 'action_view/helpers/tags/base'
+ autoload :Label, 'action_view/helpers/tags/label'
+ autoload :TextField, 'action_view/helpers/tags/text_field'
end
end
end
View
2 .../lib/action_view/helpers/tags/base_tag.rb → ...pack/lib/action_view/helpers/tags/base.rb
@@ -1,7 +1,7 @@
module ActionView
module Helpers
module Tags
- class BaseTag
+ class Base #:nodoc:
include Helpers::ActiveModelInstanceTag, Helpers::TagHelper, Helpers::FormTagHelper
DEFAULT_FIELD_OPTIONS = { "size" => 30 }
View
2 ...lib/action_view/helpers/tags/label_tag.rb → ...ack/lib/action_view/helpers/tags/label.rb
@@ -1,7 +1,7 @@
module ActionView
module Helpers
module Tags
- class LabelTag < BaseTag
+ class Label < Base #:nodoc:
def initialize(object_name, method_name, template_object, content_or_options = nil, options = nil)
content_is_options = content_or_options.is_a?(Hash)
if content_is_options
View
2 ...ction_view/helpers/tags/text_field_tag.rb → ...ib/action_view/helpers/tags/text_field.rb
@@ -1,7 +1,7 @@
module ActionView
module Helpers
module Tags
- class TextFieldTag < BaseTag
+ class TextField < Base #:nodoc:
def render
options = @options.stringify_keys
options["size"] = options["maxlength"] || DEFAULT_FIELD_OPTIONS["size"] unless options.key?("size")

0 comments on commit 514308a

Please sign in to comment.
Something went wrong with that request. Please try again.