Closed sheerun closed 11 years ago
include
is a feature?
No, read active_attr readme
Nope, but you could read what the gem can do before you criticize!
:+1: for active_attr
IIRC we've already had a discussion about issues without description/arguments /cc @jandudulski
It has an argument... Next time, I'll paste readme
What I cannot say about your issue: https://github.com/monterail/guidelines/issues/157
If you treat #157 seriously...
yes
:-1: for description
After short reading into docs I think you were ActiveAttr::BasicModel
instead of ActiveAttr::Model
in mind.
But for such a thing Rails 4 provides ActiveModel::Model
which you can easily write in Rails 3.
For attributes I prefer Virtus. Any reasons for using ActiveAttr instead?
No, I thought about ActiveAttr::Model
. Virtus is not said to be compatible with active model. There are no validations, errors, block initialization, mass assignment, fields in attributes
, and others. Active_attr has typecasting too. Any reasons to use Virtus instead?
Any reasons to use Virtus instead?
Do one thing well.
Virtus is not said to be compatible with active model
If you need to be compatible use ActiveModel::Model
There are no validations, errors
In the true OO validations shouldn't belong to model.
I understand your point, but AR is evil, we should try to look for ways how to escape from it instead of making PORO behaving like AM/AR.
If you need to be compatible use ActiveModel::Model
What about Rails 3 Apps?
Put somewhere this snippet and just include.
That's what active_attr is for....
"If you want your model to be compatible with ActiveModel, include ActiveModel::Model
in Rails 4, and include ActiveAttr::Model
in Rails 3. If not, use Virtus
instead"
so what
@jandudulski @teamon @Ostrzy @szajbus
:no_opinion:
Agree with @sherun
Best regards Dariusz Gertych
2013/8/5 Tymon Tobolski notifications@github.com
:no_opinion:
— Reply to this email directly or view it on GitHubhttps://github.com/monterail/guidelines/issues/158#issuecomment-22103169 .
@sheerun please make a PR
I can still make commits instead of PR :trollface:
It just look cleaner and have more features: