aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fixes default attributes for button_tagSergey Prikhodko2014-03-032-7/+18
|
* Remove inclusion of rubysl gem for rbx on generated GemfileCarlos Antonio da Silva2014-02-252-16/+0
| | | | | | | | | | | | | From #14026: Specific rbx-2 to limit testing on Rubinius 2.x (since there will be other versions of Rubinius > 2.x soon). Also, as of Rubinius 2.2.5, it is no longer necessary to bundle the rubysl gem. This is what Rails master/4.1 supports, so we don't need to add rubysl to gemfiles anymore.
* let `insert_record` actuall save the object.Aaron Patterson2014-02-254-4/+32
| | | | | | | | | | `before_add` callbacks are fired before the record is saved on `has_and_belongs_to_many` assocations *and* on `has_many :through` associations. Before this change, `before_add` callbacks would be fired before the record was saved on `has_and_belongs_to_many` associations, but *not* on `has_many :through` associations. Fixes #14144
* Merge pull request #14200 from spencer1248/fix_typo_in_app_generator_test_nameCarlos Antonio da Silva2014-02-251-1/+1
|\ | | | | Fix test name typo in app generator tests.
| * [skip ci] Fix test name typo in app generator tests.Spencer Rogers2014-02-251-1/+1
| |
* | Merge remote-tracking branch ↵Jon Leighton2014-02-255-13/+31
|\ \ | |/ |/| | | | | | | | | 'chancancode/fix_instance_method_already_implemented' Conflicts: activerecord/CHANGELOG.md
| * Fixed STI classes not defining an attribute method if there is aGodfrey Chan2014-02-235-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conflicting private method defined on its ancestors. The problem is that `method_defined_within?(name, klass, superklass)` only works correclty when `klass` and `superklass` are both `Class`es. If both `klass` and `superklass` are both `Class`es, they share the same inheritance chain, so if a method is defined on `klass` but not `superklass`, this method must be introduced at some point between `klass` and `superklass`. This does not work when `superklass` is a `Module`. A `Module`'s inheritance chain contains just itself. So if a method is defined on `klass` but not on `superklass`, the method could still be defined somewhere upstream, e.g. in `Object`. This fix works by avoiding calling `method_defined_within?` with a module while still fufilling the requirement (checking that the method is defined withing `superclass` but not is not a generated attribute method). 4d8ee288 is likely an attempted partial fix for this problem. This unrolls that fix and properly check the `superclass` as intended. Fixes #11569.
* | Merge pull request #14199 from arthurnn/travis_211Guillermo Iguaran2014-02-251-2/+1
|\ \ | | | | | | travis s/2.1.0/2.1.1
| * | travis s/2.1.0/2.1.1Arthur Neves2014-02-251-2/+1
|/ /
* | Merge pull request #14152 from ↵Aaron Patterson2014-02-252-24/+13
|\ \ | | | | | | | | | | | | schneems/schneems/fix-ar-wtf-why-is-there-no-environment Handle missing environment from non empty config
| * | Handle missing environment from non empty configschneems2014-02-212-24/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If using a `DATABASE_URL` and a `database.yml`. The connection information in `DATABASE_URL` should be merged into whatever environment we are in. As released in 4.1.0rc1 if someone has a database.yml but is missing a key like production: ```yml development: host: localhost ``` Then the check for blank config will return false so the information from the `DATABASE_URL` will not be used when attempting to connect to the `production` database and the connection will incorrectly fail. This commit fixes this problem and adds a test for the behavior. In addition the ability to specify a connection url in a `database.yml` like this: ``` production: postgres://localhost/foo ``` Was introduced in 4.1.0rc1 though should not be used, instead using a url sub key ``` production: url: postgres://localhost/foo ``` This url sub key was also introduced in 4.1.0rc1 though the `production: postgres://localhost/foo` was not removed. As a result we should not test this behavior.
* | | Merge pull request #14177 from yahonda/skip_tests_if_duplicate_index_not_allowedYves Senn2014-02-251-10/+13
|\ \ \ | | | | | | | | Skip test_migrate_revert_add_index_with_name for some databases
| * | | Skip test_migrate_revert_add_index_with_name if databasesYasuo Honda2014-02-251-10/+13
| | | | | | | | | | | | | | | | do not allow to create duplicate indexes on the same columns
* | | | Optimize getting started guide images, and use png instead of jpgCarlos Antonio da Silva2014-02-2516-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We noticed the rails gem increased in size between the beta and rc versions, and the reason is that some guides images were updated but not properly optimized, and one image changed from png to jpg, way bigger. Converting the jpg image back to png, and using ImageOptim to optimize all the images for web view, improves the situation [ci skip]. --- In current master/4-1-stable: 508K guides/assets/images/getting_started/ In v4.1.0.beta1: 268K guides/assets/images/getting_started/ In 4-0-stable 328K guides/assets/images/getting_started/ After the patch: 260K guides/assets/images/getting_started/
* | | | :scissors: [ci skip]Carlos Antonio da Silva2014-02-251-5/+5
|/ / /
* | | Merge pull request #14193 from ys/patch-1Vijay Dev2014-02-251-1/+1
|\ \ \ | | | | | | | | Add missing parantheses in index_exists?
| * | | Add missing parantheses in index_exists?Yannick Schutz2014-02-251-1/+1
| | | |
* | | | Point master changelogs to 4-1-stable branchCarlos Antonio da Silva2014-02-258-3831/+8
|/ / / | | | | | | | | | Remove 4-1 related entries from master [ci skip]
* | | `ActionDispatch::Head` was replaced by `Rack::Head`. Closes #14191.Yves Senn2014-02-251-1/+0
| | | | | | | | | | | | See 449039a86d802871b707dfb51ac1ed96d53526f9 for the original commit.
* | | Merge pull request #14006 from Loremaster/strong_params_improvementXavier Noria2014-02-253-6/+28
|\ \ \ | | | | | | | | Sungularize ActionController::UnpermittedParameters error in case when only 1 parameter is unpermitted.
| * | | Simple Sungularize ActionController::UnpermittedParameters error in case ↵Serj L2014-02-243-6/+28
| | | | | | | | | | | | | | | | when only 1 parameter is unpermitted.
* | | | Merge pull request #14186 from ch33hau/standardized-punctuationYves Senn2014-02-251-3/+3
|\ \ \ \ | | | | | | | | | | Standardized punctuation.
| * | | | [skip ci] Standardized punctuation.ch33hau2014-02-251-3/+3
|/ / / /
* | | | Merge pull request #14182 from mecampbellsoup/fix_typo_in_url_helper_docsArthur Nogueira Neves2014-02-241-1/+1
|\ \ \ \ | | | | | | | | | | [skip ci] Fixing typo in documentation: actionview/lib/action_view/helpers/url_helper.rb
| * | | | [skip ci] Fix typo in link_to :method option descriptionMatt Campbell2014-02-241-1/+1
|/ / / /
* | | | refactor, with_locale is not needed because I18n is mocked.Yves Senn2014-02-241-7/+5
| | | | | | | | | | | | | | | | | | | | This is a follow up to #14170. While backporting I recognized that this call is not needed at all.
* | | | Merge pull request #14170 from kritik/masterYves Senn2014-02-243-2/+20
|\ \ \ \ | | | | | | | | | | there could be more than 10 nested records
| * | | | Fix ActionView label translation for more than 10 nested elementsVladimir Krylov2014-02-243-2/+20
|/ / / /
* | | | Go with #presence_in instead of #present_in -- it doesnt sound quite as ↵David Heinemeier Hansson2014-02-243-7/+7
| | | | | | | | | | | | | | | | good, but the closer relationship to #presence over #present is ultimately worth it
* | | | refactor, extract `with_locale` helper.Yves Senn2014-02-241-87/+79
| | | |
* | | | build fix. follow up to 174c9f0df39cd338a4871f82794256cc64f68a81Yves Senn2014-02-241-1/+1
|/ / /
* | | include names in model generator warning message. refs #13515.Yves Senn2014-02-242-5/+7
| | | | | | | | | | | | | | | | | | This is a follow up to #13515. It includes the name given and the singularized version in the warning message. This will aide the user to see wether the detected singular was right or not.
* | | Merge pull request #10497 from senny/10485_does_not_coerce_stringsYves Senn2014-02-244-7/+50
|\ \ \ | | | | | | | | coerce strings when reading attributes
| * | | Coerce strings when reading attributes.Yves Senn2014-02-234-7/+50
| | |/ | |/|
* | | Merge pull request #14171 from arthurnn/extract_middleware_cacheGuillermo Iguaran2014-02-232-32/+41
|\ \ \ | | | | | | | | Extract local cache middleware
| * | | Extract local cache middlewareArthur Neves2014-02-232-32/+41
| |/ / | | | | | | | | | | | | Extract LocalCache Middleware, so it can requires rack dependencies, without adding rack dependencies to `AS::Cache::Strategy::LocalCache`.
* | | Group assets options in production env templateCarlos Antonio da Silva2014-02-231-6/+4
| | |
* | | Introduce Concern#class_methods and Kernel#concernJeremy Kemper2014-02-237-18/+113
|/ /
* | Merge pull request #13793 from senny/postgres/dynamic_range_oidYves Senn2014-02-234-63/+147
|\ \ | | | | | | Dynamically define PostgreSQL Range OIDs
| * | deprecate support for pg ranges with excluding beginnings.Yves Senn2014-02-233-23/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ruby Range object does not support excluding beginnings. We currently support excluding beginnings for some subtypes using manually by incrementing them (now using the `#succ` method). This is approach is flawed as it's not equal to an excluding beginning. This commit deprecates the current support for excluding beginnings. It also raises an `ArgumentError` for subtypes that do not implement the `succ` method. This is a temporary solution to get rid of the broken state. We might still add complete support for excluding beginnings afterwards. (Probably with a new `PGRange` object, which acts like a `Range` but has excluding beginnings.
| * | dynamically define PostgreSQL OID range types.Yves Senn2014-02-234-52/+81
| | | | | | | | | | | | | | | | | | | | | | | | This gets AR working with custom defined range types. It also removes the need for subtype specific branches in `OID::Range`. This expands the interface of all `OID` types with the `infinity` method. It's responsible to provide a value for positive and negative infinity.
* | | update version to 4.2.0.alphaYves Senn2014-02-239-11/+11
|/ /
* | Add tests for default scope behaviour changeJon Leighton2014-02-232-0/+20
| | | | | | | | See #13875
* | Merge pull request #13515 from kuldeepaggarwal/f-model-generationGodfrey Chan2014-02-225-12/+40
|\ \ | | | | | | Added warning when user tried to create model with pluralize name.
| * | Add warning when user tried to create model with pluralize name.Kuldeep Aggarwal2014-02-235-12/+40
| | | | | | | | | | | | | | | 1. Generate model with correct_name. 2. It will help new users to avoid mistakes when tried to create model with wrong name.
* | | Merge pull request #14164 from vajrasky/fix_typo_max_idGuillermo Iguaran2014-02-221-1/+1
|\ \ \ | | | | | | | | Fixed typo in comment about MAX_ID.
| * | | Fixed typo in comment about MAX_ID.Vajrasky Kok2014-02-231-1/+1
| | | |
* | | | Distinguish ConnectionNotEstablished messages: no conn pool for the class, ↵Jeremy Kemper2014-02-221-1/+4
| |_|/ |/| | | | | | | | or no conn available from the pool
* | | Merge pull request #14140 from WojtekKruszewski/optimize_foreign_key_forCarlos Antonio da Silva2014-02-211-1/+1
|\ \ \ | | | | | | | | Prevent foreign_key_for? from evaluating all attributes
| * | | Prevent foreign_key_for? from type casting all attributesWojtek Kruszewski2014-02-211-1/+1
| | | |