| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Add a prefix option to ActiveRecord::Store.store_accessor and
ActiveRecord::Store.store. This option allows stores to have identical keys
with different accessors.
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
| |
These files get modified whenever someone uses a tool like `sed`. Let's
just get this over with in one commit so it'd not adding diff noise to
something else.
|
|
|
|
|
|
|
| |
- Add check for not deleting previously created fixtures, to overcome sti fixtures from multiple files
- Added fixtures and fixtures test to verify the same
- Fixed wrong fixtures duplicating data insertion in same table
|
|
|
|
|
|
|
| |
lib/active_record/store.rb:79: warning: method redefined; discarding old color=
lib/active_record/store.rb:79: warning: previous definition of color= was here
lib/active_record/store.rb:83: warning: method redefined; discarding old color
lib/active_record/store.rb:83: warning: previous definition of color was here
|
|
|
|
|
|
|
|
|
|
| |
Renaming the test accordingly to its behaviour
Adding 'Fixes' statement to changelog
Improving tests legibility & changelog
Undoing mistakenly removed empty line & further improving changelog
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow store accessors to be overrided like other attribute methods,
e.g.:
class User < ActiveRecord::Base
store :settings, accessors: [ :color, :homepage ], coder: JSON
def color
super || 'red'
end
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The native JSON library bypasses the `to_json` overrides in
active_support/core_ext/object/to_json.rb by calling its native
implementation directly. However `ActiveRecord::Store` uses a
HWIA so `JSON.dump` will call our `to_json` instead with a
`State` object for options rather than a `Hash`. This generates
a warning when the `:encoding`, `:only` & `:except` keys are
accessed in `Hash#as_json` because the `State` object delegates
unknown keys to `instance_variable_get` in its `:[]` method.
Workaround this warning in the test by using a custom coder that
calls `ActiveSupport::JSON.encode` directly.
|
| |
|
| |
|
|
|
|
| |
store_accessor
|
|
|
|
| |
used out of the box.
|
| |
|
|
|
|
|
|
| |
Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead.
It is expected that the table name be defined in the model, but this is not explicitly tested here. This will need to be fixed.
|
| |
|
|
|
|
| |
stores [DHH]
|
|
Signed-off-by: José Valim <jose.valim@gmail.com>
|