Aaron Patterson
47617ecdf7
expose a few attribute changed methods
2013-06-11 13:39:46 -07:00
Aaron Patterson
4b824b0520
push the touch method outside the eval
2013-06-11 13:29:59 -07:00
Aaron Patterson
3680074b4d
remove unused variable
2013-06-11 12:03:01 -07:00
Aaron Patterson
bf28422cbd
check whether the association is constructible rather than checking constants
2013-06-11 12:01:29 -07:00
Aaron Patterson
e79fae5584
use attribute methods for finding key values rather than generating method names
2013-06-11 11:59:50 -07:00
Aaron Patterson
9ca9ff3fbe
push belongs_to counter cache method to a single method
2013-06-11 11:53:30 -07:00
Aaron Patterson
c9d6c1b4af
push before_destroy counter cache method to a single method
2013-06-11 11:47:24 -07:00
Aaron Patterson
ebd3aedbb4
remove evaled belongs_to counter cache method
2013-06-11 11:43:04 -07:00
Aaron Patterson
0d3589ea12
adding callbacks should be private
2013-06-11 11:34:53 -07:00
Aaron Patterson
4909337a1f
indentation
2013-06-11 11:24:16 -07:00
Aaron Patterson
0d22947e00
remove evals from the association
2013-06-11 10:38:57 -07:00
Aaron Patterson
8777ae1f4a
reduce evals in depdendent associations
2013-06-11 10:33:16 -07:00
Aaron Patterson
a63a964a5d
remove some evals from callback conditionals
2013-06-11 10:20:29 -07:00
Carlos Antonio da Silva
ebf2113a05
Merge pull request #10897 from prathamesh-sonpatki/active-support-typos
...
Fixed typos in activesupport [ci skip]
2013-06-10 05:01:14 -07:00
Carlos Antonio da Silva
0c0a64c828
Merge pull request #10906 from darai2k/fix-activemodel-validations-doc
...
fix ActiveModel::Validations.validators_on doc
2013-06-10 04:58:17 -07:00
Daichi Arai
d61241b060
fix ActiveModel::Validations.validators_on doc
2013-06-10 18:34:34 +09:00
Steve Klabnik
cbfcd9ddf1
Merge pull request #10795 from atambo/master
...
Don't blindly call blame_file! on exceptions in ActiveSupport::Dependes::Loadable
2013-06-09 23:48:28 -07:00
Andrew Kreiling
a548792aa0
Don't blindly call blame_file! on exceptions in ActiveSupport::Dependencies::Loadable
...
It is possible under some environments to receive an Exception that is
not extended with Blamable (e.g. JRuby).
ActiveSupport::Dependencies::Loadable#load_dependency blindly call
blame_file! on the exception which throws it's own NoMethodError
exception and hides the original Exception.
This commit fixes #9521
2013-06-09 18:20:10 -04:00
Jon Leighton
f5e133e830
Merge pull request #10710 from senny/5554_let_the_database_raise_on_counts
...
Remove column restrictions for `#count`, let the database raise if the SQL is invalid.
2013-06-09 06:02:56 -07:00
Rashmi Yadav
f7cf0a3932
Image optimized for web view
...
Used imageoptim, Saved few bytes
http://imageoptim.com/
2013-06-09 13:27:14 +02:00
Yves Senn
da9b5d4a84
Remove fall back and column restrictions for count
.
2013-06-09 12:53:04 +02:00
Yves Senn
db519c0c9a
cleanup whitespace in relation.rb
2013-06-09 12:48:56 +02:00
Jon Leighton
ae6e6d9530
Merge pull request #10886 from wangjohn/chnges_for_automatic_inverse_associations
...
Documentation and cleanup of automatic discovery of inverse associations
2013-06-09 01:58:42 -07:00
Prathamesh Sonpatki
442c52e815
Fixed typos in activesupport [ci skip]
...
- eval'ed to eval'd in accordance with https://github.com/rails/rails/pull/10889
- tried to improve statement about compiling Procs into methods using define_method
2013-06-09 14:23:45 +05:30
Xavier Noria
8b82387c97
Merge pull request #10889 from diatmpravin/fix-typo-in-action-view
...
fixed typo in action_view template
2013-06-08 14:32:27 -07:00
Jeff Cohen
5992167663
Merge branch 'master' of github.com:rails/docrails
2013-06-08 15:49:24 -05:00
Guillermo Iguaran
9f7ac5a0ff
Merge pull request #10893 from arunagw/test_for_checkpending_middleware
...
Testing CheckPending middleware
2013-06-08 12:12:29 -07:00
Arun Agrawal
2c86fa211b
Testing CheckPending middleware
2013-06-08 21:10:15 +02:00
Thiago Pinto
763e5a8662
doc: renaming table name to follow the file's standards
2013-06-08 15:02:30 -04:00
Thiago Pinto
667569ab04
instructions for variations and alternatives for ActiveRecord#find
2013-06-08 15:01:15 -04:00
Thiago Pinto
6de2644e9b
Merge branch 'master' of github.com:rails/docrails
2013-06-08 13:36:41 -04:00
Thiago Pinto
b8640d4790
explaining ActiveRecord#first in rails 3 and 4
2013-06-08 13:35:47 -04:00
wangjohn
d6b03a3767
Getting rid of the +automatic_inverse_of: false+ option in associations in favor
...
of using +inverse_of: false+ option. Changing the documentation and
adding a CHANGELOG entry for the automatic inverse detection feature.
2013-06-08 10:16:51 -07:00
barelyknown
5c1a2cf6b3
change format example to read better when rendered with full_messages
...
The capital O was awkward and the validation wouldn't read "right" to the user.
2013-06-08 12:36:53 -04:00
Jeff Cohen
ad2dc5f90c
Describe ActiveSupport core extensions for BigDecimal, JSON support, and instance variable names.
2013-06-08 11:10:30 -05:00
diatmpravin
a3025975ec
fixed typo in action_view template
2013-06-08 20:40:36 +05:30
Rashmi Yadav
1f4c4c69ee
Middleware in guide updated [ci skip]
2013-06-08 14:00:53 +02:00
Andrew White
b7f9de27f0
Override Time.at to work with Time-like values
...
Time.at allows passing a single Time argument which is then converted
to an integer. The conversion code since 1.9.3r429 explicitly checks
for an instance of Time so we need to override it to allow DateTime
and ActiveSupport::TimeWithZone values.
2013-06-08 09:50:15 +01:00
Steve Klabnik
ad3d333321
’ -> ' [ci skip]
2013-06-08 16:05:43 +08:00
Steve Klabnik
2d31df49d5
Merge pull request #10872 from AJAlabs/master
...
Update Getting Started Guide - Strong Parameter [ci skip]
2013-06-07 18:47:44 -07:00
AJ Acevedo
15f3de20b0
Update Getting Started Guide - Strong Parameters
...
modified: guides/source/getting_started.md
2013-06-07 20:33:20 -04:00
Thiago Pinto
04417f3eb5
Merge branch 'master' of github.com:lifo/docrails
2013-06-07 19:12:47 -04:00
Matthew Hensrud
f1d453b4fd
Added bang method versions to association basics guide
2013-06-07 17:37:02 -04:00
Jon Leighton
2b763131ea
Revert "Merge pull request #10539 from davidcelis/ar-sql-improvements"
...
This reverts commit 257fa6897d9c85da16b7c9fcb4ae3008198d320e, reversing
changes made to 94725b81f5588e4b0f43222c4f142c3135941b4b.
The build failed
https://travis-ci.org/rails/rails/builds/7883546
2013-06-07 18:41:11 +01:00
Jon Leighton
257fa6897d
Merge pull request #10539 from davidcelis/ar-sql-improvements
...
Improve performance of ActiveRecord::Relation#blank?
2013-06-07 10:24:40 -07:00
David Celis
4e2bec3832
ActiveRecord::Relation#blank? should LIMIT 1
...
This is an SQL improvement to ActiveRecord::Relation#blank?. Currently,
it calls `to_a` on the Relation, which loads all records in the
association, and calls `blank?` on the loaded Array. There are other
ways, however, to check the emptiness of an association that are far
more performant. `#empty?`, `#exists?` and `#any?` all attach a `LIMIT
1` to the SQL query before firing it off, which is a nice query
improvement. `#blank?` should do the same!
Bonus performance improvements will also happen for `#present?`, which
merely calls the negation of `#blank?`
Signed-off-by: David Celis <me@davidcel.is>
2013-06-07 10:16:59 -07:00
Carlos Antonio da Silva
94725b81f5
Merge pull request #10860 from ka8725/activemodel_log
...
Ignore activemodel/log/ folder
2013-06-07 05:27:29 -07:00
Carlos Antonio da Silva
b2b004262a
Merge pull request #10875 from vipulnsward/fix_some_typos_in_as
...
Fix some typos [ci skip]
2013-06-07 05:26:13 -07:00
Vipul A M
2c92f5b92f
Fix some typos
2013-06-07 16:23:29 +05:30
Andrew White
68598df25a
Merge pull request #10874 from rlivsey/patch-1
...
Docfix: Use public interface instead of setting instance variables
2013-06-07 03:45:50 -07:00