Open maximebedard opened 8 years ago
LGTM
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 :prefix
option (specifically with a string/symbol prefix). This PR seems very close, except that the regular ActiveRecord Store allows prefix: :foo
instead of prefix: true
, to prefix the methods with 'foo_'
instead of the field name.
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!
Is there anything I can do to help get this PR out and get the string/symbol prefix complete?
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 https://github.com/byroot/activerecord-typedstore/issues/7.
Thoughts?
@byroot @rafaelfranca