News
Classy Inheritance: Release 0.6.2
Added back in validates_associated to give better error messages. Fixed typo.
Classy Inheritance: Release 0.6.1
This was causing errors as the method signatures didn't match.
Classy Inheritance: Release 0.6.0
Thanks to Brian Johnson his major contributions to this release...almost everything :)
*New postfix option
*Prefix and postfix options now accept other values other than true.
*Small patch related to support of class_name option.
*Tests added for new prefix and postfix functionality
Classy Inheritance: Release 0.5.0
First things, first. Thanks to Geoff Garside for his contribution to this release. Many, many thanks Geoff.
New options validates_presence_if and validates_associated_if give you options on when the validations should be done.
Classy Inheritance now has tests! There isn't a massive amount yet, but we have a decent start.
Classy Inheritance: Release 0.4.4
Added in correct support for class_name attribute.
Next order of business: tests.
Classy Inheritance: Release 0.4.3
:prefix was not removed from the options before passing to the has_many/belong_to methods.
thanks to Pascal for the notice.
Classy Inheritance: Release 0.4.2
Added in conditional to save a polymorphic depends_on (has_one) relationship if it was an update.
The initial issue was caused by Rails automatically creating the has_one record and then my code was saving the record. That meant two saves, not cool. So, I fixed it assuming Rails would do the maintenance. Wrong.
My bad for not testing further, I'll do my best to avoid this in the future. Rails' bad for a confusing implementation, either save or don't save!
Classy Inheritance: Release 0.4.1
Removed extra save call for polymorphic associations. Rails handles the save on a has_one relationship.
Classy Inheritance: Release 0.4.0
Classy inheritance now adds support for the standard Rails association options.
If your depends_on call includes the :as attribute, the Rails association used is has_one, otherwise it's belongs_to.
So, you can now add options such as :dependent and :class_name.
As there are multiple option combination choices, I haven't tested them all. So, please let me know if you run into an issue.
Classy Inheritance: Release 0.3.0
- Add: :prefix parameter to depends_on call. So if you have User.depends_on(:profile, :attrs => [:first_name], :prefix => true), your user model will have @user.profile_first_name. This is to avoid name collisions with requisite classes.
Also available in: Atom