Add prefix to attribute definition#43
Conversation
|
LGTM |
|
|
||
| it 'defines accessors' do | ||
| expect(model).to respond_to :preferences_language | ||
| expect(model).to respond_to :preferences_language= |
There was a problem hiding this comment.
Could you add a test to make sure language and language= are not defined?
There was a problem hiding this comment.
Yep, I need to look into how the attribute definition works as well. The values does not seem to be set correctly. I'll ping back once I've figured it out.
a9ea2c5 to
97478f7
Compare
|
Typed Store looks great! It would really be a good fit to simplify something my team did a long time ago. The one thing that's stopping me from using it is the Is there anything I can do to help get this PR out and get the string/symbol prefix complete? Here's the relevant ActiveRecord code. https://github.com/rails/rails/blob/de53ba56cab69fb9707785a397a59ac4aaee9d6f/activerecord/lib/active_record/store.rb#L112-L120 Thanks! |
This PR is very outdated, but if you feel like submitting a similar one that is rebased, I'll review it. |
|
Sounds good. Thanks, Jean! |
|
I was also looking for this functionality as well, so I went ahead and rebased and put up a PR at #91 |
Whilst adding accessor: false, I thought it would be convenient to add prefix to attributes as well. It also fixes #7.
Thoughts?
@byroot @rafaelfranca