Commit Graph

34144 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
7ad590d25f User assert_kind_of, invert assert_equal expectations 2012-11-29 09:59:35 -02:00
Santiago Pastorino
544b5ee48b Tiny refactor 2012-11-29 09:53:25 -02:00
Carlos Antonio da Silva
5e086cc15a Merge pull request #8363 from Takehiro-Adachi/add-string-options-examples-to-currentpage-method
Added examples to current_page? method [ci skip]
2012-11-29 03:04:31 -08:00
Xavier Noria
7c2797c687 Merge pull request #8356 from senny/add_links_to_rails4_guide
augmented the Rails 4 guides with links back to Github
2012-11-29 02:31:50 -08:00
Yves Senn
4fe70ee472 augment the rails4 guide with links to PRs 2012-11-29 10:48:02 +01:00
Yves Senn
ce7a493a30 add list of extracted plugins to rails4 guide 2012-11-29 10:48:02 +01:00
Jason Rush
89b5b31cc4 Added STI support to init and building associations
Allows you to do BaseClass.new(:type => "SubClass") as well as
parent.children.build(:type => "SubClass") or parent.build_child
to initialize an STI subclass. Ensures that the class name is a
valid class and that it is in the ancestors of the super class
that the association is expecting.
2012-11-29 05:50:34 +00:00
Andrew White
eba430aecb Merge pull request #7961 from exviva/seconds_until_end_of_day
Add #seconds_until_end_of_day to DateTime and Time
2012-11-28 21:47:01 -08:00
Olek Janiszewski
ce73055139 Add #seconds_until_end_of_day to DateTime and Time 2012-11-29 06:39:32 +01:00
Rafael Mendonça França
ec17f0d352 Add CHANGELOG entries for the observes extraction
[ci skip]
2012-11-29 01:08:36 -02:00
Takehiro Adachi
0204f8039e added examples when options is string 2012-11-29 12:06:43 +09:00
Rafael Mendonça França
8b270620d5 Merge pull request #8361 from lucasmazza/typo
Fix typo in the Observers deprecation message.
2012-11-28 17:13:00 -08:00
Lucas Mazza
54aed2387c Fix typo in the Observers deprecation message. [ci skip] 2012-11-28 23:08:41 -02:00
Rafael Mendonça França
39e85b3b90 Merge branch 'extract_observers' 2012-11-28 22:49:34 -02:00
Rafael Mendonça França
f862376d16 Gracefully handle upgrading apps with observers
Rather than just raising a NoMethodError when copying the config, this
commit adds a warning message until either the rails-observers gem is
installed or the relevant config options are removed.
2012-11-28 22:49:22 -02:00
Rafael Mendonça França
ccecab3ba9 Remove observers and sweepers
They was extracted from a plugin.

See https://github.com/rails/rails-observers

[Rafael Mendonça França + Steve Klabnik]
2012-11-28 22:46:49 -02:00
Carlos Antonio da Silva
e38d310912 Merge pull request #8261 from steveklabnik/fix_mb_chars
Simplify String#mb_chars and fix documentation.
2012-11-28 14:48:04 -08:00
Steve Klabnik
bd852603a1 Simplify String#mb_chars and stop proxying #class
This behavior mattered under Ruby 1.8, but that doesn't matter now
that we don't support it.

In addition, we don't want to proxy the #class method. A test was added
to prevent against regressions.
2012-11-28 13:58:51 -08:00
Steve Klabnik
27b79f4c91 Fix documentation for String#mb_chars.
This documentation has been out of date.
2012-11-28 13:58:51 -08:00
Rafael Mendonça França
e9df07870f Merge pull request #8355 from steveklabnik/update_7418
Ensure that associations have a symbol argument.
2012-11-28 13:41:29 -08:00
Steve Klabnik
22df38ca33 Ensure that associations have a symbol argument.
Fixes #7418.
2012-11-28 13:39:42 -08:00
Rafael Mendonça França
4c99d0870c Merge pull request #8352 from steveklabnik/update_7858
Specify type of singular assication during serialization
2012-11-28 12:53:48 -08:00
Steve Klabnik
9504b44cf6 Specify type of singular association during serialization
When serialising a class, specify the type of any singular associations, if
necessary. Rails already correctly specifies the :type of any enumerable
association (e.g. a has_many association), but made no attempt to do so for
non-enumerables (e.g. a has_one association).
We must specify the :type of any STI association. A has_one
association to a class which uses single-table inheritance is an example of
this type of association.

Fixes #7471
2012-11-28 11:48:32 -08:00
José Valim
5f1595633c Merge pull request #8350 from claudiob/restore_default_require_paths
Revert "rails gem has no lib directory to require"
2012-11-28 10:27:03 -08:00
claudiob
626086a3c6 Revert "rails gem has no lib directory to require"
This reverts commit 6bcbd6046f82c5f0114249a6b725f9679a140b9a.

The default value for require_paths is ['lib'], and Rails does not
need to include any lib/ file to build the gem, so the previous
commit 'makes sense'. However, gems will not be built at all if
require_paths is empty (see https://gist.github.com/1065473), so
it's better to stick with the default, which does not have any
side-effects
2012-11-28 10:20:54 -08:00
Rafael Mendonça França
3e965e2144 Fix some indentation in the postgresql_specific_schema 2012-11-28 12:02:11 -02:00
Rafael Mendonça França
f036862c0f Add comment to a table without model.
This table is being used to verify if the :limit options is being
ignored for text and binary columns
2012-11-28 12:02:11 -02:00
Rafael Mendonça França
f3aaf6d7d1 Use assert_nil instead of assert_equal 2012-11-28 12:02:11 -02:00
Carlos Antonio da Silva
daa7b4e2f0 Use "refute" instead of "assert !"
Remove FIXME tag from abstract adapter test.
2012-11-27 21:15:53 -02:00
Xavier Noria
46ebce6b49 prevent Dependencies#remove_const from autoloading parents [fixes #8301] 2012-11-28 00:13:14 +01:00
Rafael Mendonça França
5aade8245a Merge pull request #8318 from Empact/fixture-file
Use File.join to better integrate fixture_path in fixture_file_upload.
2012-11-27 13:06:04 -08:00
Rafael Mendonça França
6c0ea8875f Merge pull request #8339 from latortuga/cache-digest-opt-out-cleanup
Cache digest opt out cleanup
2012-11-27 10:19:55 -08:00
Drew Ulmer
e105adc240 Cleanup CacheHelper changes allowing opt-out of cache digests
Instead of deleting the skip_digest option flag, this changes the method to merely check the
key. This change is because of a discussion in this thread:

https://github.com/rails/rails/pull/8317

This commit also makes #fragment_name_with_digest private due to its
functionality being subsumed by #cache_fragment_name.
2012-11-27 12:16:25 -06:00
Drew Ulmer
e969ba955d Add CHANGELOG entry for opt-out option of automatic template digesting 2012-11-27 12:14:03 -06:00
Rafael Mendonça França
5b9c9026c4 Revert "Merge pull request #8341 from amatsuda/bundle_source_rubygems"
This reverts commit 33b29e0112db62d3a8c798bb58f51c0a839d9e26, reversing
changes made to ac8c729342e6b020a57d0d6887c8a8d5b39f96e0.

Reason:

https://github.com/rails/rails/pull/4684#commitcomment-920313
2012-11-27 14:59:58 -02:00
Rafael Mendonça França
33b29e0112 Merge pull request #8341 from amatsuda/bundle_source_rubygems
default source in Gemfiles to :rubygems rather than hardcoding the URL
2012-11-27 08:35:26 -08:00
Rafael Mendonça França
ac8c729342 Merge pull request #8340 from skojin/grouped_options_for_select_without_hash_sort
No sort Hash options in #grouped_options_for_select
2012-11-27 08:20:30 -08:00
Akira Matsuda
4ed645b37e default source in Gemfiles to :rubygems rather than hardcoding the URL
* I guess this would be the preferrable default for Bundler
* current version of Bundler converts :rubygems into 'http://rubygems.org', not https://,
  and that will help those who are working on a very poor network environment that doesn't allow SSL
2012-11-28 01:15:02 +09:00
Sergey Kojin
0195d6138b No sort Hash options in #grouped_options_for_select 2012-11-27 20:04:37 +04:00
Carlos Antonio da Silva
0be0a978ef Merge pull request #8338 from ugisozols/master
Fix Strong Parameters docs [ci skip]
2012-11-27 05:16:52 -08:00
Uģis Ozols
9fb4803016 Fix Strong Parameters docs.
It's only possible to inherit from ActiveRecord::Base and not include
it.
2012-11-27 15:11:30 +02:00
Rafael Mendonça França
d7f8aabf71 Merge pull request #8337 from amatsuda/unshift_html_scanner
unshift html-scanner into $LOAD_PATH rather than append
2012-11-27 04:19:10 -08:00
Carlos Antonio da Silva
56aba69c34 Merge pull request #8336 from rashmi14yadav/warning_removed
Unused variable warning removed
2012-11-27 02:46:25 -08:00
Akira Matsuda
919cec823a unshift html-scanner into $LOAD_PATH rather than append 2012-11-27 19:32:30 +09:00
Rashmi Yadav
585e64fb14 Unused variable warning removed 2012-11-27 15:24:25 +05:30
José Valim
1f29aba10e Merge pull request #8333 from amatsuda/rails_gem_empty_require_path
empty rails gem's require_paths
2012-11-27 00:26:58 -08:00
Akira Matsuda
6bcbd6046f rails gem has no lib directory to require 2012-11-27 17:14:14 +09:00
Rafael Mendonça França
80b8df5f3d Remove warning of circular require
This file was using mime_types before load the Mime::Type class.
When trying to register first Mime::Type it load mime_type that loads
mime_types in the end.

Requiring mime_type ensure that we have the class definition and the
mime types
2012-11-27 02:37:24 -02:00
Carlos Antonio da Silva
462a90565c Remove useless check of AR being defined from teardown fixtures
We are already in the AR namespace, there's no way for it to be
undefined. See the cousin commit 13e72db77063f57c3028a906690d42fb068845bb

Refactor a bit teardown fixtures to avoid two conditionals.
2012-11-27 00:19:26 -02:00
Carlos Antonio da Silva
8df46eac76 Refactor generators tests to include test helpers in the parent class 2012-11-27 00:07:48 -02:00