- 26 3月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
- 25 3月, 2016 14 次提交
-
-
由 Kasper Timm Hansen 提交于
Do not create a hash key when calling ActiveModel::Errors#include?
-
由 Kasper Timm Hansen 提交于
set in no more used in ActionView::Template::Types
-
由 Kasper Timm Hansen 提交于
Fix typo in Action Pack changelog [ci skip]
-
由 Gaurav Sharma 提交于
initially set is used for template type https://github.com/rails/rails/commit/67f55e28 after this commit https://github.com/rails/rails/commit/91f2ad36 it’s not require
-
由 Prathamesh Sonpatki 提交于
-
由 Rafael Mendonça França 提交于
This reverts commit 43ccebc1. This is not fixing the configuration problem since we are assigning to the ActiveRecord::Base not the configuration. See #24303.
-
由 Sean Griffin 提交于
Since precision is always larger than scale, it can actually change rounding behavior. Given a precision of 5 and a scale of 3, when you apply the precision of 5 to `1.25047`, the result is `1.2505`, which when the scale is applied would be `1.251` instead of the expected `1.250`. This issue appears to only occur with floats, as scale doesn't apply to other numeric types, and the bigdecimal constructor actually ignores precision entirely when working with strings. There's no way we could handle this for the "unknown object which responds to `to_d`" case, as we can't assume an interface for applying the scale. Fixes #24235
-
由 Arthur Nogueira Neves 提交于
Move sequence value methods to Model level
-
由 Sean Griffin 提交于
When a proc is given as a default value, the form builder ends up displaying `Proc#to_s` when the default is used. That's because we didn't handle the proc until type casting. This issue technically can occur any time that a proc is the value before type casting, but in reality the only place that will occur is when a proc default is provided through the attributes API, so the best place to handle this edge case is there. I've opted to memoize instead of just moving the `Proc#call` up, as this made me realize that it could potentially interact very poorly with dirty checking. The code here is a little redundant, but I don't want to rely on how `value_before_type_cast` is implemented in the super class, even if it's just an `attr_reader`. Fixes #24249 Close #24306
-
由 Esteban Pastorino 提交于
From: https://github.com/rails/rails/issues/24279 Problem: By doing `record.errors.include? :foo`, it adds a new key to the @messages hash that defaults to an empty array. This happens because of a combination of these 2 commits: https://github.com/rails/rails/commit/b97035df64f5b2f912425c4a7fcb6e6bb3ddab8d (Added in Rails 4.1) and https://github.com/rails/rails/commit/6ec8ba16d85d5feaccb993c9756c1edcbbf0ba13#diff-fdcf8b65b5fb954372c6fe1ddf284c78R76 (Rails 5.0) By adding the default proc that returns an array for non-existing keys, ruby adds that key to the hash. Solution: Change `#include?` to check with `has_key?` and then check if that value is `present?`. Add test case for ActiveModels::Errors#include?
-
由 Arthur Nogueira Neves 提交于
Make 'migrate' clear the schema cache afterward
-
由 Arthur Neves 提交于
`prefetch_primary_key?` and `next_sequence_value` methods live in the connection level at the moment, that make sense when you are generating the sequence from the database, in the same connection. Which is the use case today at the Oracle and Postgres adapters. However if you have an service that generates IDs, that has nothing to do with the database connection, and should not be fetched from there. Another use case, is if you want to use another connection to fetch IDs, that would not be possible with the current implementation, however when we move those methods to the model level, you can use a new connection there. Also this makes easier for gems to add behavior on those methods.
-
由 Jeremy Daer 提交于
-
由 Chris Arcand 提交于
Without clearing the caches afterward, removals done in migrations would not be reflected in a separate task in the same process. That is, given a table with a migration to remove a column, the schema cache would still reflect that a table has that in something such as the 'db:seed' task: `rake db:migrate db:seed` (A common thing to do in a script for a project ala `bin/setup`) vs `rake db:migrate && rake db:seed` (Two processes) The first would not reflect that the column was removed. The second would (cache reset).
-
- 24 3月, 2016 15 次提交
-
-
由 Rafael França 提交于
Fix a tip in Active Record time attributes deprecation
-
由 Rafael França 提交于
Use Range#cover? for Date inclusion validator
-
由 Genadi Samokovarov 提交于
I have hit this deprecation in a newly created Rails 5 application and the suggested tip lead me to a `NoMethodError`. It's not trivial to actually make the following work, because of the ActiveRecord::Base class attributes setting dance in the Active Record railtie. config.active_record.time_zone_aware_types << :time Decided to suggest setting it explicitly to the values we need. [ci skip]
-
由 प्रथमेश Sonpatki 提交于
Added missing custom context validation documentation
-
由 Vijay Kumar Agrawal 提交于
-
由 Matthew Draper 提交于
Change for `ActiveRecord::Migration.[]` to raise `ArgumentError` inst…
-
由 yui-knk 提交于
The error is raised because user passed invalid version number to a public api of `ActiveRecord`, so `ArgumentError` is more suitable. And add a test case checking if an error is raised when unknown migration version is passed, because these test cases are not implemented.
-
由 ojab 提交于
-
由 ojab 提交于
-
由 Rafael França 提交于
Correctly generate application_mailer.rb in mountable engines
-
由 Rafael França 提交于
fixed spelling in the mattr_reader documentation
-
由 Jeremy Daer 提交于
Are you missing that template or did you omit it on purpose?
-
由 Jeremy Daer 提交于
Cable: Gracefully handle disconnected clients
-
由 Jeremy Daer 提交于
Append sql_mode instead of overwriting in strict mode
-
由 Rafael França 提交于
Remove reference to unmaintained plugin/gem in Security guide
-
- 23 3月, 2016 10 次提交
-
-
由 Kasper Timm Hansen 提交于
Bugfix: ActionCable not loaded when generating plugin without ActiveRecord
-
由 Torsten Braun 提交于
mattr_writer to mattr_reader
-
由 Koen Punt 提交于
When generating a plugin without ActiveRecord (-O), ActionCable wasn't include, which causes problems with the require action_cable statement in cable.js add active_job require statement also updated order of require statements to match with all.rb
-
由 Torsten Braun 提交于
renamed cattr_reader to mattr_reader
-
由 Olivier Lacan 提交于
[restful-authentication](https://rubygems.org/gems/restful-authentication/versions/1.2.1) hasn't been updated since September 6th, 2012 so it might not be a great idea to recommend that Rails users try it out. Devise seems like a much more popular and secure solution that automatically resets sessions on sign in and out so it's a great example in this case. /cc @tenderlove @josevalim
-
由 Kasper Timm Hansen 提交于
Didn't feel we were clear enough about our motivation for placing Rails first and why we needed to call `load_plugins`.
-
由 Kasper Timm Hansen 提交于
The useless explicit self calls were driving me nuts.
-
由 Kasper Timm Hansen 提交于
When calling `load_plugins` minitest would fill out its extensions, then we'd tackle ourselves on as the last plugin. Because minitest loads plugins in order we will ultimately have the last say on what reporters will be used. Invert that strategy by putting ourselves first and give other plugins plenty of leeway to override our default reporter setup. Fixes #24179.
-
由 Rafael França 提交于
Use || instead of `or` in bin/(update|setup) tpl as preferred by rails code convention
-
由 Marek L 提交于
-