Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rails/rails
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Apr 27, 2012
2 parents cf1a83c + 7d1a42a commit 4ed6167
Show file tree
Hide file tree
Showing 23 changed files with 885 additions and 564 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_controller/test_case.rb
Expand Up @@ -27,13 +27,13 @@ def setup_subscriptions
path = payload[:virtual_path]
next unless path
partial = path =~ /^.*\/_[^\/]*$/

if partial
@partials[path] += 1
@partials[path.split("/").last] += 1
@templates[path] += 1
else
@templates[path] += 1
end

@templates[path] += 1
end
end

Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/number_helper.rb
Expand Up @@ -233,7 +233,7 @@ def number_with_delimiter(number, options = {})

parts = number.to_s.to_str.split('.')
parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{options[:delimiter]}")
parts.join(options[:separator]).html_safe
safe_join(parts, options[:separator])
end

# Formats a +number+ with the specified level of <tt>:precision</tt> (e.g., 112.32 has a precision
Expand Down
6 changes: 3 additions & 3 deletions actionpack/lib/action_view/helpers/record_tag_helper.rb
Expand Up @@ -94,10 +94,10 @@ def content_tag_for(tag_name, single_or_multiple_records, prefix = nil, options
# for each record.
def content_tag_for_single_record(tag_name, record, prefix, options, &block)
options = options ? options.dup : {}
options.merge!(:class => "#{dom_class(record, prefix)} #{options[:class]}".rstrip, :id => dom_id(record, prefix))
options[:class] = "#{dom_class(record, prefix)} #{options[:class]}".rstrip
options[:id] = dom_id(record, prefix)

content = block.arity == 0 ? capture(&block) : capture(record, &block)
content_tag(tag_name, content, options)
content_tag(tag_name, capture(record, &block), options)
end
end
end
Expand Down
Expand Up @@ -16,7 +16,7 @@ def render_with_scope
end

def render_with_has_many_through_association
@developer = Developer.find(:first)
@developer = Developer.first
render :partial => @developer.topics
end

Expand All @@ -31,7 +31,7 @@ def render_with_belongs_to_association
end

def render_with_record
@developer = Developer.find(:first)
@developer = Developer.first
render :partial => @developer
end

Expand Down

0 comments on commit 4ed6167

Please sign in to comment.