Nick Sutterer
Nick Sutterer
This has to be implemented in the Disposable gem, not in Reform, but I now remember there was a reason why we didn't allow it...
I like being mysterious.. :stuck_out_tongue_winking_eye: It will surely be available at some point. Can't say when, though.
Could you show your form that triggers this behaviour? I don't understand how that can happen?!?!
@darioghilardi To me it sounds as if you should have different form classes that map to different environments (e.g. Admin or normal user) or is your setup even more convoluted?...
Theoretically, it's not a big problem to allow altering the definitions after instantiation, it's a simple hash. This must go into Disposable, though! :sunrise:
No, no, you don't need to change or create classes at runtime! Let me play with it a bit. :kissing_heart:
I am picturing something along the following (inspired by @dblock). ``` ruby class SongRepresenter < Roar::Decorator # could also be form, maybe different DSL method property :id before_render do |definitions,...
If we did that, it would change the representer class per run, which is not good. I'd rather do that on the instance level!
Ah, no, the `definitions` is the object that holds "the definitions", as in, the property objects (which is thrown away after the run).
Keep in mind that populators are only called when the incoming document contains a corresponding fragment. "Not working" - what is "not working"? :joy: Does your computer start up? Have...