store_attribute icon indicating copy to clipboard operation
store_attribute copied to clipboard

ActiveRecord extension which adds typecasting to store accessors

Results 12 store_attribute issues
Sort by recently updated
recently updated
newest added

Not a specific issue, just looking to clarify why default values work like they do. Following along with https://github.com/palkan/store_attribute/issues/6 and https://github.com/palkan/store_attribute/pull/7 it looks like it should follow the Attribute API...

Enables better compatibility with other gems (i.e. StoreModel) which rely on attributes being registered on the model. ### Checklist - [x] I've added tests for this change - [x] I've...

**Ruby Version:** 3.2.2 **Rails Version:** 6.1.7.6 **PostgreSQL Version:** 14 **Store Attribute Version:** 0.8.1 confirmed on 1.2.0 as well ### What did you do? Specified the type as `:json` when using...

question

In a [recent commit](https://github.com/rails/rails/commit/e0a55b038f7f2f50d1467876558be183be6cedaa) `attributes_to_define_after_schema_loads` was removed from ActiveRecord. This change caused an exception ### Tell us about your environment **Ruby Version:** 3.2.2 **Rails Version:** main branch **PostgreSQL Version:** 16...

bug

Hi, Here's the behaviour on Rails 8.0: ``` Loading staging environment (Rails 8.0.3) e(staging)> a1 = AlliedHealthActivity.new(session_type: "INDI", specialist_type: "PSYC") e(staging)> a1.session_type => "INDI" e(staging)> a1.specialist_type => "PSYC" ``` Class...

Previously, registered store attributes could show inconsistent values between the store and Rails' attribute system, causing validation failures and incorrect behavior with methods like `attributes`, `*_before_type_cast`, and dirty tracking. This...

Fixes [#50](https://github.com/palkan/store_attribute/issues/50) ### Checklist - [x] I've added tests for this change - [x] I've added a Changelog entry - [x] I've updated a documentation (Readme) - Not needed

When using `store_attribute_register_attributes = true`, there seems to be some funky interplay with Rails' attribute system. Some examples are validators checking the wrong values (e.g. #52 ), the attributes hash...

When using `store_attribute_register_attributes = true` and a numericality validation, we run into a bug where the `default` option we pass to `attributes` overrides the actual value we get from our...

**Description** When you register attributes via `store_attributes` and pass in a type instance (instead of a symbol), with `self.store_attribute_register_attributes = true` the attribute registration code still calls `ActiveRecord::Type.lookup`, which errors...