José Valim
03f2249153
Use . instead of :: for class methods, add CHANGELOG entries
2012-06-10 11:38:37 +02:00
Marc-Andre Lafortune
4faaa81161
+ ActiveRecord::Base#destroy!
2012-06-06 13:27:51 -04:00
Rafael Mendonça França
3449b757da
Sync CHANGLOG with the 3-2-stable branch
2012-06-01 11:41:30 -03:00
Carlos Antonio da Silva
c51fb02406
Fix changelog example for count method with block [ci skip]
...
Missed that too, thanks again @splattael.
2012-05-31 10:10:12 -03:00
Carlos Antonio da Silva
f9cb645dfc
Yield only one argument instead of splatting.
...
Add Changelog entry. Closes #4003
2012-05-28 23:16:34 -03:00
Francesco Rodriguez
39f0698405
Add support for CollectionAssociation#delete by Fixnum or String
...
I found the next issue between CollectionAssociation `delete`
and `destroy`.
class Person < ActiveRecord::Base
has_many :pets
end
person.pets.destroy(1)
# => OK, returns the destroyed object
person.pets.destroy("2")
# => OK, returns the destroyed object
person.pets.delete(1)
# => ActiveRecord::AssociationTypeMismatch
person.pets.delete("2")
# => ActiveRecord::AssociationTypeMismatch
Adding support for deleting with a fixnum or string like
`destroy` method.
2012-05-28 19:57:43 -05:00
Jon Leighton
1ae68ea35f
fix typo [ci skip]
2012-05-18 16:39:37 +01:00
Jon Leighton
103ce300ec
add changelogs about deprecated stuff [ci skip]
2012-05-18 16:30:05 +01:00
Johannes Barre
a8b370f5c2
Don't destroy readonly models
2012-05-17 17:52:17 +02:00
Radoslav Stankov
64872d1e34
Relation#from to accept other Relation objects
...
Record.from("(#{sub_query.to_sql})") -> Record.from(sub_query)
Record.from("(#{sub_query.to_sql}) a") -> Record.from(sub_query, :a)
2012-05-17 02:36:13 +03:00
Alexey Vakhov
2baa8ba953
Fix misprint in AR changelog
2012-05-16 09:06:57 +04:00
Angelo capilleri
0bbcc91b8c
corrected some misspelling
2012-05-15 18:01:40 +02:00
Rafael Mendonça França
9b40f5cc36
Copy edit [ci skip]
2012-05-13 19:04:33 -03:00
Andrey Voronkov
3c0bf0435c
Custom coders support for ActiveRecord::Store. JSON, YAML, Marshal can be used out of the box.
2012-05-09 19:20:14 +04:00
Michael Pearson
2054a17dd8
Changelog entry regarding mysql(2) STRICT_ALL_TABLES
2012-05-05 18:53:46 +10:00
Marcelo Silveira
66b9e4c857
Adding note about first
and take
to the changelog
2012-05-02 21:25:41 -03:00
Vijay Dev
5722915fa7
changelog fixes. Closes #3911
2012-05-01 19:27:36 +05:30
Michael de Silva
363888109f
Update Rails 3.2.3 release date in changelogs as March 30, 2012
...
The release date details have been taken from
http://weblog.rubyonrails.org/2012/3/30/ann-rails-3-2-3-has-been-released/
2012-04-16 13:20:53 +03:00
Joshua Wood
ca0af8221a
Automatically create indexes for references/belongs_to statements in migrations.
2012-04-14 14:18:42 -07:00
Jon Leighton
8c2c60511b
Add bang versions of relation query methods.
...
The main reason for this is that I want to separate the code that does
the mutating from the code that does the cloning.
2012-04-12 17:57:54 +01:00
Jon Leighton
13b3c77e39
Add Relation#find_by and Relation#find_by!
2012-03-30 12:52:29 +01:00
Guillermo Iguaran
bb2e2d8cb6
CHANGELOG entry for AR#slice
2012-03-29 17:50:06 -05:00
Jon Leighton
0a12a5f816
Deprecate eager-evaluated scopes.
...
Don't use this:
scope :red, where(color: 'red')
default_scope where(color: 'red')
Use this:
scope :red, -> { where(color: 'red') }
default_scope { where(color: 'red') }
The former has numerous issues. It is a common newbie gotcha to do
the following:
scope :recent, where(published_at: Time.now - 2.weeks)
Or a more subtle variant:
scope :recent, -> { where(published_at: Time.now - 2.weeks) }
scope :recent_red, recent.where(color: 'red')
Eager scopes are also very complex to implement within Active
Record, and there are still bugs. For example, the following does
not do what you expect:
scope :remove_conditions, except(:where)
where(...).remove_conditions # => still has conditions
2012-03-21 22:18:18 +00:00
Carlos Antonio da Silva
dde3058c3a
Expand changelog and upgrading rails guide with IdentityMap info
2012-03-13 20:08:55 -03:00
Carlos Antonio da Silva
a8dd21d8b4
Remove IdentityMap
2012-03-13 20:08:54 -03:00
Andrew White
eee32af45e
Add dynamic find_or_create_by_{attribute}! method.
2012-03-12 14:16:19 +00:00
Rafael Mendonça França
d804790634
Fix my name in the CHANGELOG to follow the convention
...
Also add missing entries and use the formating convention
2012-03-09 00:54:21 -03:00
Vijay Dev
8a714c4d80
fix incorrect changelog headings [ci skip].
...
Last commit message should not have said 'Rails 4' either
2012-03-09 02:30:49 +05:30
Vijay Dev
db6542178c
changelog updates for Rails 4 [ci skip]
2012-03-09 02:22:17 +05:30
kennyj
aa9b64790b
Update CHANGELOG to fix wrong extension.
2012-03-08 20:07:44 +09:00
Aaron Patterson
447ecb08ca
Merge pull request #5162 from kennyj/schema_cache_dump
...
[Proposal] Schema cache dump
2012-03-07 16:44:50 -08:00
claudiob
05c6caf48c
Add release dates to documentation
...
Set "March 1, 2012" as the release date for 3.2.2, 3.1.4, 3.0.12
2012-03-01 11:20:03 -08:00
kennyj
46c12172fe
Add entry for schema cache dump to CHANGELOG.md.
2012-03-01 01:22:42 +09:00
Paco Guzman
152a393d4f
Update changelogs with rails 3.0-stable branch info
2012-02-25 13:50:08 +01:00
Josef Šimánek
b4b2f5d8e4
Update activerecord/CHANGELOG.md
2012-02-18 18:29:48 +01:00
Marcelo Silveira
d70e0236df
Added where option to add_index to support postgresql partial indices
...
The `add_index` method now supports a `where` option that receives a
string with the partial index criteria.
add_index(:accounts, :code, :where => "active")
Generates
CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
2012-02-09 01:20:52 -02:00
Juanjo Bazán
8270e4a8ce
Added none
query method to return zero records.
...
And added NullRelation class implementing the null object pattern for the `Relation` class.
2012-01-31 19:50:09 +01:00
Manoj
336ff8a97e
has_many/has_one, :dependent => :restrict, deprecation added.
2012-01-29 15:28:22 +05:30
Rafael Mendonça França
080bd83df9
Add create_join_table
migration helper to create HABTM join tables
2012-01-27 15:34:53 -02:00
Matt Bridges
abb1423a8d
Fixed small typo in ActveRecord/CHANGELOG.md
2012-01-26 08:51:41 -06:00
Xavier Noria
9725c0cb34
syncs 3-2-stable CHANGELOGs in master
2012-01-26 13:12:04 +01:00
claudiob
6d426b1035
Add release date of Rails 3.2.0 to documentation
2012-01-26 01:53:38 -08:00
Aaron Patterson
522c0fdb55
The primary key is always initialized in the @attributes hash to nil (unless
...
another value has been specified).
2012-01-25 14:42:22 -08:00
Olek Janiszewski
7afbc89c37
Add ActiveRecord::Base#with_lock
...
Add a `with_lock` method to ActiveRecord objects, which starts
a transaction, locks the object (pessimistically) and yields to the block.
The method takes one (optional) parameter and passes it to `lock!`.
Before:
class Order < ActiveRecord::Base
def cancel!
transaction do
lock!
# ... cancelling logic
end
end
end
After:
class Order < ActiveRecord::Base
def cancel!
with_lock do
# ... cancelling logic
end
end
end
2012-01-18 23:23:41 +01:00
Jon Leighton
8c0c0838cf
Make it more explicit that the feature is deprecated, not removed.
2012-01-16 21:35:21 +00:00
Jon Leighton
a2dab46cae
Deprecate inferred JOINs with includes + SQL snippets.
...
See the CHANGELOG for details.
Fixes #950 .
2012-01-16 21:32:12 +00:00
Vijay Dev
84d633a0b3
Merge pull request #4387 from Karunakar/releasenotes
...
Added the release dates for rails 3.1.1, rails 3.1.2, rails 3.1.3
2012-01-12 11:23:51 -08:00
Santiago Pastorino
838d30f182
Add CHANGELOG entry
2012-01-11 23:52:57 -02:00
Aaron Patterson
f82e244a80
dropping support for schema_info
.
2012-01-10 10:54:10 -08:00
Karunakar (Ruby)
e634d25ac8
Added the release dates for rails 3.1.1, rails 3.1.2, rails 3.1.3
2012-01-08 23:26:46 +05:30