clio / polymorphic_integer_type

MIT License
37 stars 35 forks source link

Code was not adding foreign_type constraint #5

Closed tispratik closed 10 years ago

tispratik commented 10 years ago

When we already had some constraints on the relation definition.

Ex, below case did not work: has_many :constraints, as: :restricted_object, integer_type: true, :conditions => { :is_deleted => false }

A workaround prior to this commit was to use the reverse mapping: has_many :constraints, as: :restricted_object, integer_type: true, :conditions => { :is_deleted => false, restricted_object_type: RESTRICTED_OBJECT_MAP_REVERSE[self.to_s] }

doliveirakn commented 10 years ago

@tispratik Thanks for the pull request for this. I will merge this in and release a new version of the gem at some point soon.

tispratik commented 10 years ago

Awesome thanks!

On Fri, Feb 21, 2014 at 11:56 AM, doliveirakn notifications@github.comwrote:

@tispratik https://github.com/tispratik Thanks for the pull request for this. I will merge this in and release a new version of the gem at some point soon.

Reply to this email directly or view it on GitHubhttps://github.com/doliveirakn/polymorphic_integer_type/pull/5#issuecomment-35767126 .

doliveirakn commented 10 years ago

This has been merged. I have released a new point release for this change. Version 1.0.2

tispratik commented 10 years ago

Awesome! Thanks!

On Tue, Feb 25, 2014 at 3:16 PM, doliveirakn notifications@github.comwrote:

This has been merged. I have released a new point release for this change. Version 1.0.2

Reply to this email directly or view it on GitHubhttps://github.com/doliveirakn/polymorphic_integer_type/pull/5#issuecomment-36071348 .

tispratik commented 10 years ago

You will probably need to bump up the version here https://github.com/doliveirakn/polymorphic_integer_type/blob/master/lib/polymorphic_integer_type/version.rb

On Tue, Feb 25, 2014 at 3:16 PM, pratik khadloya tispratik@gmail.comwrote:

Awesome! Thanks!

On Tue, Feb 25, 2014 at 3:16 PM, doliveirakn notifications@github.comwrote:

This has been merged. I have released a new point release for this change. Version 1.0.2

Reply to this email directly or view it on GitHubhttps://github.com/doliveirakn/polymorphic_integer_type/pull/5#issuecomment-36071348 .

doliveirakn commented 10 years ago

haha, I did, It was just wasn't pushed up yet.