Nate Berkopec
7910d7d863
Remove broken Commmand Line guide link
...
[ci skip]
2013-11-15 09:33:49 -05:00
Alexey Chernenkov
0e953c94b1
Unify cattr_*
interface: allow to pass a block to cattr_reader
.
...
Example:
class A
cattr_reader(:defr) { 'default_reader_value' }
end
A.defr # => 'default_reader_value'
2013-11-15 19:54:51 +06:00
Carlos Antonio da Silva
81475534ed
Merge pull request #12898 from chocoby/fix/changelog_comment
...
Fix CHANGELOG typo [ci skip]
2013-11-15 05:33:38 -08:00
Carlos Antonio da Silva
00adce4ff0
Avoid hash lookups for building an array of required defaults
...
Only set the value once after it's calculated.
2013-11-15 11:29:32 -02:00
Carlos Antonio da Silva
3f2bf0dbe9
Get rid of useless temp variable
2013-11-15 11:29:31 -02:00
Carlos Antonio da Silva
5f00f13724
Set values instead of building hashes with single values for merging
2013-11-15 11:29:31 -02:00
chocoby
04907b64ac
Fix CHANGELOG typo [ci skip]
2013-11-15 22:22:49 +09:00
Andrew White
ce06d57e39
Merge pull request #9599 from ognevsky/hash-inside-array-in-url-for
...
Take Hash with options inside Array in #url_for
2013-11-15 04:00:19 -08:00
Andrey Ognevsky
d04c4fac3b
Take Hash with options inside Array in #url_for
2013-11-15 15:50:42 +04:00
Yves Senn
77ed4d98a7
document id prefixed String usage of .find
. refs #12891 [ci skip]
2013-11-15 10:13:42 +01:00
Josh Jordan
ea6640d05d
Allocate one less object using html_safe during content_tag construction
2013-11-14 23:51:40 -05:00
Carlos Antonio da Silva
aa7fdfb859
Remove short circuit return in favor of simple conditional
2013-11-15 01:11:57 -02:00
Carlos Antonio da Silva
374d465f28
Invert conditional to avoid double checking for Regexp
2013-11-15 01:04:57 -02:00
Carlos Antonio da Silva
9014a79436
Only check that the option exists once instead of doing on each conditional
2013-11-15 01:01:59 -02:00
Carlos Antonio da Silva
61fef76106
Remove argument that is accessible as attribute
2013-11-15 01:00:53 -02:00
Carlos Antonio da Silva
b8c6c08452
Cache regexp source on format validation to avoid allocating new objects
...
Example:
>> r = /some-regexp/
=> /some-regexp/
>> r.source.object_id == r.source.object_id
=> false
2013-11-15 00:38:55 -02:00
Carlos Antonio da Silva
70161ae3b8
Make code simpler to read by using a case statement
2013-11-15 00:24:54 -02:00
Carlos Antonio da Silva
12815e0d44
Avoid a new hash allocation
2013-11-15 00:24:54 -02:00
Carlos Antonio da Silva
4c7e3a3087
Use a simple conditional rather than short circuit with next
2013-11-15 00:19:03 -02:00
Carlos Antonio da Silva
d2992818e0
Simplify number parsing logic in numericality validation
2013-11-15 00:07:22 -02:00
Carlos Antonio da Silva
f70e30ec6d
Avoid creation of extra hash with merge just to set a value
2013-11-15 00:07:22 -02:00
Carlos Antonio da Silva
6b84de4575
Fix test name [ci skip]
2013-11-14 23:45:30 -02:00
Carlos Antonio da Silva
6cad0e317b
Fix AR Changelog examples and improve syntax highlight [ci skip]
2013-11-14 23:45:30 -02:00
Carlos Antonio da Silva
11673a7977
Set branch for arel in Gemfile so that we can use bundle local config [ci skip]
2013-11-14 23:21:56 -02:00
Jeremy Kemper
bed324c6fe
Merge pull request #12862 from chancancode/json_gem_compat
...
JSON gem compatibility
2013-11-14 16:10:39 -08:00
Godfrey Chan
0f33d70e89
Improved compatibility with the stdlib JSON gem.
...
Previously, calling `::JSON.{generate,dump}` sometimes causes
unexpected failures such as intridea/multi_json#86 .
`::JSON.{generate,dump}` now bypasses the ActiveSupport JSON encoder
completely and yields the same result with or without ActiveSupport.
This means that it will **not** call `as_json` and will ignore any
options that the JSON gem does not natively understand. To invoke
ActiveSupport's JSON encoder instead, use `obj.to_json(options)` or
`ActiveSupport::JSON.encode(obj, options)`.
2013-11-14 15:46:43 -08:00
David Heinemeier Hansson
07996ebc50
Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep".
...
This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.
2013-11-14 15:31:27 -08:00
David Heinemeier Hansson
421c81bd18
Fix that eager loading of polymorphic associations did not work with association empty?/any? predicates any more (there is still a problem when select is applied to a relation, or if you try association#exists? -- but its easier to work around)
2013-11-14 14:43:14 -08:00
Rafael Mendonça França
e15ea62b26
Merge pull request #12893 from javan/to-param-addendum
...
Addendum to #12891
2013-11-14 12:57:46 -08:00
Rafael Mendonça França
f33ab01b7e
Merge pull request #12819 from vipulnsward/also_dup_column_types
...
Also dup `column_types` in AR::Result `initialize_copy`
2013-11-14 12:42:23 -08:00
Javan Makhmali
633100b9e5
Addendum to #12891
...
* Fix incorrectly named tests
* Restore Object#to_param behavior
* Ensure param is derived from a squished and truncated string
2013-11-14 15:35:53 -05:00
Rafael Mendonça França
d4587bab24
Merge pull request #12892 from akshay-vishnoi/refactor
...
avoiding next statements
2013-11-14 12:32:23 -08:00
Akshay Vishnoi
dbcd085013
avoiding next statements
2013-11-15 01:37:33 +05:30
Rafael Mendonça França
84961dc5df
Merge pull request #12889 from kuldeepaggarwal/speed_ups
...
Used Yield instead of block.call
2013-11-14 11:29:28 -08:00
Kuldeep Aggarwal
d3a1ce1cdc
Used Yield instead of block.call
2013-11-15 00:53:57 +05:30
David Heinemeier Hansson
a23bf6f55a
Merge pull request #12891 from javan/to-param
...
Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method
2013-11-14 11:03:31 -08:00
Rafael Mendonça França
83a065d181
Merge pull request #12890 from akshay-vishnoi/refactor
...
class methods moved to already defined class<<self block
2013-11-14 10:56:51 -08:00
Akshay Vishnoi
fdf36d8110
class methods moved to already defined class<<self block
2013-11-15 00:23:35 +05:30
Javan Makhmali
547999df25
Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method.
2013-11-14 13:38:08 -05:00
Xavier Noria
05427671d5
Merge pull request #12886 from akshay-vishnoi/refactor
...
#presence used
2013-11-14 03:01:47 -08:00
Akshay Vishnoi
1529e61036
#presence used
2013-11-14 16:08:43 +05:30
Xavier Noria
436a9c1b85
Merge pull request #12861 from route/missed_require_for_module
...
Clean up `require ‘active_support/deprecation’` and remove circular require
2013-11-14 01:03:10 -08:00
Dmitry Vorotilin
1e62457a6d
Clean up require ‘active_support/deprecation’
and remove circular require
2013-11-14 12:59:56 +04:00
Yves Senn
c576e24e0e
Merge pull request #12832 from vipulnsward/move_schema_creation
...
Move `SchemaCreation` to its own file instead of `AbstractAdapter`.
2013-11-14 00:52:11 -08:00
Guillermo Iguaran
48ea089907
Merge pull request #12884 from akshay-vishnoi/refactor
...
Ruby's new Hash syntax applied in actionmailer
2013-11-14 00:22:57 -08:00
Mr A
3134605391
Ruby's new Hash syntax applied in actionmailer
2013-11-14 13:41:37 +05:30
Guillermo Iguaran
93999edfd1
Merge pull request #12845 from amatsuda/should_ar_depend_on_rails
...
Refer to Rails.env from AR only when Rails is defined
2013-11-13 23:03:43 -08:00
Guillermo Iguaran
02f17778b6
Merge pull request #12883 from Amit-Thawait/master
...
Updated guides link for 3.2.x to latest stable version 3.2.15 [ci skip]
2013-11-13 23:00:01 -08:00
Guillermo Iguaran
7dc3baa96b
Get rid of unused variable
2013-11-14 01:57:09 -05:00
Amit Thawait
d2737419f4
Updated guides link for 3.2.x to latest stable version 3.2.15 [skip-ci]
2013-11-14 11:13:22 +05:30