This change was necessary because the whitelist wouldn't work.
It would be painful for users trying to update their applications.
db:test:clone and db:test:prepare use
ActiveRecord::Base. configurations, so we need to load the rails
environment, otherwise the config wont be in place.
(Just realize that when upgrading a rails3.2 to 4 app)
review @rafae…
Create config/tokens.yml file for store of tokens and move config.secret_key_base to this file.
This fixes SQL queries with MySQL where the same name is used several times for the same column, therefore breaking the build.
When a field is named several times, second and fu…
ref f8c9a4d3e88181cee644f91e1342bfe896ca64c6
Prevent invalid code when using dynamic finders with Ruby's reserved words. The dynamic finder was creating the method signature with the parameters name, which may have reserved words and this way creating invalid Ruby code.
Closes: …
I originally encountered this problem when dealing with the following data structure:
class Group < ActiveRecord::Base
has_many :memberships
has_many :users, through: :memberships
def as_json(options = {})
sup...
Fix wrong test, which does SELECT AS with already existing Model attribute name.
PR #10635 introduced rescue from ArgumentError thrown by Base64.strict_decode64.
This broke natural order of things for StaleSessionCheck#stale_session_check! which tried auto_loading a class based on ArgumentError message , a…
It was raising an error when renaming columns with long names. In order to prevent that, we check if the new_index_name length is greater than the allowed_index_name_length. If exceeds, we decrease it.
Closes #12585
cc @rafaelf…
This active support exception was originally committed 7 years ago (https://github.com/rails/rails/commit/2b37d59976268013b7e518e5af244947f688d315), I believe a typo in the error message made it so far and managed to confuse many (includ…
This active support exception was originally committed 7 years ago (https://github.com/rails/rails/commit/2b37d59976268013b7e518e5af244947f688d315), I believe a typo in the error message made it so far and managed to confuse many (includ…
Currently the Cache#fetch method has a race_condition_ttl option which kinda fakes hit with stale data while the the cache is updated by other. But…. There will be a poor request that must wait for the cache to be updated while oth…
Related to #
There is order dependence between enforce_available_locales and default_locale. enforce_available_locales must be set beforehand to make sure it's up to date when the default_locale is set.
Clarified where to run the generate command on lines 292 and 371.
Split up run-on sentences.
Fixed grammar and pluralization errors.
The most common scenario to demonstrate the bug:
assert !model.approved?
Topic.transaction do
model.approved = true
model.save!
raise ActiveRecord::Rollback
end
model.save!
assert @first.reload.approved
…
In the following example
class Transaction < ActiveRecord::Base
belongs_to :account
scope :with_type, -> do
select "#{self.name.underscore.pluralize}.*, #{self.name.underscore.pluralize}.tableoid::regclass as tabl...
In the following example
class Transaction < ActiveRecord::Base
belongs_to :account
scope :with_type, -> do
select "#{self.name.underscore.pluralize}.*, #{self.name.underscore.pluralize}.tableoid::regclass as tabl...
Also wrap surrounding text to 80 chars.