- 27 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Part of the larger refactoring to remove type casting from Arel. We can inform it that we already have the right type by wrapping the value in an `Arel::Nodes::Quoted`. This commit can be reverted when we have removed type casting from Arel in Rail 5.1
-
- 18 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Oh hey, we got to remove some code because of that!
-
- 28 6月, 2014 1 次提交
-
-
We are moving this behavior out to an object that we would like to keep separated from `ActiveRecord::Base`, which means not passing the class object to it. As such, we need to stop using `instance_exec`, and instead close over the subclass on global type decorators that are applied in `Base`.
-
- 24 6月, 2014 1 次提交
-
-
由 Yves Senn 提交于
Adding `# :nodoc:` to the parent `class` / `module` is not going to ignore nested classes or modules. There is a modifier `# :nodoc: all` but sadly the containing class or module will continue to be in the docs. /cc @sgrif
-
- 17 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 11 6月, 2014 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 07 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Reduces the number of things outside of attribute methods that cares about the details of how we store and type cast attributes
-
- 31 5月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
`@attributes` was actually used for `_before_type_cast` and friends, while `@attributes_cache` is the type cast version (and caching is the wrong word there, but I'm working on removing the conditionals around that). I opted for `@raw_attributes`, because `_before_type_cast` is also semantically misleading. The values in said hash are in the state given by the form builder or database, so raw seemed to be a good word.
-
- 20 2月, 2014 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
This is to ensure that they are not accidentally called by the app code. They are renamed to _create_record and _update_record respectively. Closes #11645
-
- 17 11月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 24 9月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 22 7月, 2013 2 次提交
-
-
由 Ben Woosley 提交于
This includes fixing typos in changelog, removing a deprecated mocha/setup test require, and preferring the `column_for_attribute` accessor over direct access to the columns_hash in the new code.
-
由 Alfred Wong 提交于
When calling quote_value the underlying connection sometimes requires more information about the column to properly return the correct quoted value. I ran into this issue when using optimistic locking in JRuby and the activerecord-jdbcmssql-adapter. In SQLSever 2000, we aren't allowed to insert a integer into a NVARCHAR column type so we need to format it as N'3' if we want to insert into the NVARCHAR type. Unfortuantely, without the column type being passed the connection adapter cannot properly return the correct quote value because it doesn't know to return N'3' or '3'. This patch is fairly straight forward where it just passes in the column type into the quote_value, as it already has the ability to take in the column, so it can properly handle at the connection level. I've added the tests required to make sure that the quote_value method is being passed the column type so that the underlying connection can determine how to quote the value.
-
- 14 7月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 10 3月, 2013 1 次提交
-
-
由 Ben Moss 提交于
This allows end-users to have a `connection` method on their models without clashing with ActiveRecord internals.
-
- 04 1月, 2013 1 次提交
-
-
- 26 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
-
- 21 10月, 2012 1 次提交
-
-
由 Jeremy Kemper 提交于
This reverts commit 83846838.
-
- 20 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
-
- 18 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Rather than doing it every time an instance is instantiated.
-
- 14 7月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 16 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
- 30 5月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 24 5月, 2012 1 次提交
-
- 20 5月, 2012 1 次提交
-
-
由 Henrik Hodne 提交于
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
-
- 30 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 08 3月, 2012 1 次提交
-
-
由 Nick Rogers 提交于
Fix deleting from a HABTM join table upon destroying an object of a model with optimistic locking enabled. Issue #5332.
-
- 07 3月, 2012 1 次提交
-
-
由 Robin Roestenburg 提交于
-
- 04 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 31 1月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
* Relation#order can receive order attributes as different arguments, add example; * Readonly does not handle deletion of records, only modification; * locking_version column does not need to default to 0, Rails handles nil values; * Change references from "set_locking_column" to "self.locking_column".
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
-
- 24 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 22 12月, 2011 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 23 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 15 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 25 10月, 2011 1 次提交
-
-
由 Joost Baaij 提交于
-
- 15 10月, 2011 1 次提交
-
-
由 Christian Bäuerlein 提交于
-
- 14 10月, 2011 1 次提交
-
-
由 Christian Bäuerlein 提交于
-
- 09 8月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Make it the responsibility of the connection to hold onto an ARel visitor for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
-