Skip to content
This repository was archived by the owner on Feb 9, 2019. It is now read-only.

class and include_predecessor_id paramters added#6

Open
davidkovaccs wants to merge 3 commits intodipth:masterfrom
davidkovaccs:master
Open

class and include_predecessor_id paramters added#6
davidkovaccs wants to merge 3 commits intodipth:masterfrom
davidkovaccs:master

Conversation

@davidkovaccs
Copy link
Copy Markdown

Hi!

I've added a :class => "::Namespace::ClassName" parameter to acts_as_heir_of to be able to inherit classes from other namespace. This also fixes a bug when the predecessor class name was camelized (like: ActivityItem).

And I've added a :include_predecessor_id => true parameter what adds {predecessor_name}_id as an attribute to the child class.

Regards, David

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I read it, you are asking two things: (A) Is the params hash present, and (B) Is the params[:class] present. So why not simply ask params[:class].present?

@dipth
Copy link
Copy Markdown
Owner

dipth commented Jul 22, 2013

Please try to address the concerns that @ekampp pointed out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants