Steven Yang
8867e16a60
correct documentation about active_record behavior
2013-06-15 00:34:10 +08:00
Guillermo Iguaran
90a6059dd2
Merge pull request #10833 from hone/remove_initialize_on_precompile
...
`initialize_on_precompile` is not used anymore.
2013-06-13 19:22:57 -07:00
Terence Lee
2d5a6de4e2
initialize_on_precompile
is not used anymore.
2013-06-13 16:33:39 -07:00
Aaron Patterson
383842d079
quoted table name is also cached
2013-06-13 16:07:11 -07:00
Aaron Patterson
96925570a1
table name is cached on the class, so stop caching twice
2013-06-13 16:06:41 -07:00
Aaron Patterson
f4767bc844
calculate types on construction
2013-06-13 16:03:40 -07:00
Aaron Patterson
bf966ad8ee
only cache the primary key column in one place
2013-06-13 15:57:48 -07:00
Aaron Patterson
cbff6ee180
these methods are never called, so remove them
2013-06-13 15:46:13 -07:00
Aaron Patterson
8f37ba81ab
This test does not test anything that happens in the real world. If you
...
recreate the models without mucking with internal caches of the relation
objects, then the test fails.
For example:
class Man < ActiveRecord::Base
has_many :interests
end
class Interest < ActiveRecord::Base
belongs_to :man
end
Then do this test:
def test_validate_presence_of_parent_fails_without_inverse_of
repair_validations(Interest) do
Interest.validates_presence_of(:man)
assert_no_difference ['Man.count', 'Interest.count'] do
man = Man.create(:name => 'John',
:interests_attributes => [{:topic=>'Cars'}, {:topic=>'Sports'}])
assert_not_predicate man.errors[:"interests.man"], :empty?
end
end
end
The test will fail. This is a bad test, so I am removing it.
2013-06-13 15:36:50 -07:00
Guillermo Iguaran
934369f529
Don't set X-UA-Compatible header by default
...
We are setting this header to chrome=1 for Chrome Frame and this will be
retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for
details
2013-06-13 14:56:02 -05:00
Vijay Dev
41a398f859
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
guides/source/upgrading_ruby_on_rails.md
2013-06-14 01:14:56 +05:30
Vijay Dev
2f0a5c7ac5
copy editing AS guide [ci skip]
2013-06-14 01:07:02 +05:30
Vijay Dev
7663149f72
copy edits [ci skip]
2013-06-14 00:58:11 +05:30
Vijay Dev
c78b4310cf
Revert "Add detailed steps on how to squash multiple commits into a single detailed commit"
...
This reverts commit 6df9c595ad8e473d15a81a9291e891476bc833c2.
2013-06-14 00:55:05 +05:30
Vijay Dev
1283a52db8
Revert "Whitespace trimming in guides generation"
...
This reverts commit 91a1cf7013252753567b36f61bfcd5fd0a5bb2b8.
Reason: code changes disallowed in docrails, even if they are
guides generation related.
2013-06-14 00:30:40 +05:30
Aaron Patterson
930d0e129c
oops. step away from the keyboard aaron. 😢
2013-06-13 11:01:27 -07:00
Aaron Patterson
27be568639
fix caching of automatic inverse of. 💣
2013-06-13 11:00:02 -07:00
Aaron Patterson
634fd040db
let the object stay in charge of internal cache invalidation
2013-06-13 10:59:11 -07:00
Aaron Patterson
9abcb131f9
refute the predicate for better failure messages
2013-06-13 10:50:53 -07:00
Aaron Patterson
f379185a89
reduce automatic_inverse_of caching logic
2013-06-13 10:49:29 -07:00
Aaron Patterson
5d46c570de
active_record should always be set. Do or do not, there is no try
2013-06-13 10:23:15 -07:00
Aaron Patterson
16b70fddd4
push ambiguous reflection warning down to reflection name calculation
2013-06-13 10:10:06 -07:00
Aaron Patterson
db1b92f4a3
clean up ivar assignment
2013-06-13 10:10:06 -07:00
Yves Senn
399c369107
Merge pull request #10890 from buytruckload/master
...
update format validation documetation
2013-06-13 09:52:18 -07:00
Aaron Patterson
b483a0d2a7
Ambiguous reflections are on :through relationships are no longer supported.
...
For example, you need to change this:
class Author < ActiveRecord::Base
has_many :posts
has_many :taggings, :through => :posts
end
class Post < ActiveRecord::Base
has_one :tagging
has_many :taggings
end
class Tagging < ActiveRecord::Base
end
To this:
class Author < ActiveRecord::Base
has_many :posts
has_many :taggings, :through => :posts, :source => :tagging
end
class Post < ActiveRecord::Base
has_one :tagging
has_many :taggings
end
class Tagging < ActiveRecord::Base
end
2013-06-13 09:46:42 -07:00
Rafael Mendonça França
47e8bb10a4
Merge pull request #10425 from ranjaykrishna/push_add_column_options_to_schema_creation
...
Push add column options to schema creation
2013-06-13 05:49:31 -07:00
Andrew White
a272d0cbe2
Add missing nsec test for 17f5d8e
2013-06-13 12:21:19 +01:00
Andrew White
17f5d8e062
Keep sub-second resolution when wrapping a DateTime value
...
Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone`
keeps sub-second resolution when wrapping a `DateTime` value.
Fixes #10855
2013-06-13 12:01:12 +01:00
jeran
ea72430b84
Moving add_column_options! up to SchemaCreation
...
removed two instances of add_column_options! from abstract_mysql_adapter
reworked rename_column_sql to remove add_column_options from schema_statements
changed to use new hash syntax.
2013-06-12 19:32:44 -07:00
Aaron Patterson
b3bc3aa5cb
sometimes singularize does not work, so we get a list of two strings. just uniq them
2013-06-12 18:56:23 -07:00
Aaron Patterson
9e7040d8a0
no need to cache hash lookups
2013-06-12 17:07:35 -07:00
Aaron Patterson
9d79333140
split aggregates from association reflections to avoid is_a checks later
2013-06-12 16:58:22 -07:00
Aaron Patterson
0ee351b428
remove unnecessary is_a check
2013-06-12 16:36:36 -07:00
Rashmi Yadav
ad694f2f26
Using 1.9 syntax for edge guides
2013-06-12 23:04:40 +02:00
Aaron Patterson
d7e2310913
we should apply the default scope before querying
2013-06-12 11:51:26 -07:00
Guillermo Iguaran
9fc574fdea
Merge pull request #10915 from gsamokovarov/railties-autoloads
...
Refactor of ::Rails module
2013-06-12 07:18:50 -07:00
Guillermo Iguaran
5dedd2cd21
Merge pull request #10928 from jetthoughts/use_sprockets_rails_2_0_0
...
Use sprockets-rails 2.0.0
2013-06-12 07:00:40 -07:00
Paul Nikitochkin
37db946023
Use sprockets-rails 2.0.0
2013-06-12 16:57:04 +03:00
Carlos Antonio da Silva
9996e3c351
Merge pull request #10919 from vipulnsward/cleanup_as_test
...
Drop extra variable from test
2013-06-12 05:41:30 -07:00
Carlos Antonio da Silva
e81420d451
Merge pull request #10922 from prathamesh-sonpatki/typos
...
Fix typos in AR changelog [ci skip]
2013-06-12 05:39:38 -07:00
Carlos Antonio da Silva
820f674e92
Merge pull request #10923 from arunagw/warning_removed_minitest
...
Warning removed for Minitest
2013-06-12 05:39:09 -07:00
Carlos Antonio da Silva
44a6612579
Merge pull request #10924 from pjg/patch-1
...
Grammar fix [ci skip]
2013-06-12 05:38:44 -07:00
Paweł Gościcki
12bee89c31
Grammar nazi at work [ci skip]
2013-06-12 14:12:21 +02:00
Arun Agrawal
260b234740
Warning removed for Minitest
2013-06-12 13:20:43 +02:00
Yves Senn
3db3f0407e
minor doc changes to ActiveSupport::BacktraceCleaner
.
2013-06-12 12:02:45 +02:00
Prathamesh Sonpatki
aa5b627849
Fix typos in AR changelog [ci skip]
2013-06-12 15:15:52 +05:30
Genadi Samokovarov
50be56dcde
Refactor of ::Rails module
...
1. Used ActiveSupport::Autoload to dry-up the autoload definitions.
2. Used ActiveSupport's delegate to dry up the application proxied
attributes.
3. Did a little white space change on Rails.groups.
2013-06-12 11:42:36 +03:00
Vipul A M
48b6860b79
Drop extra variable from test
2013-06-12 11:18:35 +05:30
Aaron Patterson
de9e9bbbad
bind values should not be merged between scopes
2013-06-11 15:13:04 -07:00
Aaron Patterson
701e48e4ac
stop adding a new method for touch callbacks
2013-06-11 13:40:39 -07:00