Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/rails/rails into rails

  • Loading branch information...
commit 47ae053c5303adf6420315405503434d393c7353 2 parents b79da0d + fc6b961
@sandeepr-sourcebits sandeepr-sourcebits authored
View
4 actionpack/lib/abstract_controller/layouts.rb
@@ -311,7 +311,7 @@ def _write_layout_method
when false
nil
when true
- raise ArgumentError, "Layouts must be specified as a String, Symbol, false, or nil"
+ raise ArgumentError, "Layouts must be specified as a String, Symbol, Proc, false, or nil"
when nil
name_clause
end
@@ -371,7 +371,7 @@ def _layout_for_option(name)
when false, nil then nil
else
raise ArgumentError,
- "String, true, or false, expected for `layout'; you passed #{name.inspect}"
+ "String, Proc, :default, true, or false, expected for `layout'; you passed #{name.inspect}"
end
end
View
4 activerecord/lib/active_record/relation.rb
@@ -507,6 +507,10 @@ def with_default_scope #:nodoc:
end
end
+ def blank?
+ to_a.blank?
+ end
+
private
def references_eager_loaded_tables?
Please sign in to comment.
Something went wrong with that request. Please try again.