Re: [Rails-core] has_association? method on ActiveRecord

2014-11-09 Thread Danny Sperry
I think you're right, before digging into active record I didn't even know about reflections. I've been using rails for about a year and the wording is odd to me. We have has_attribute? and it seemed to me like there would just be a `has_assocation?` to go along with it. I think

[Rails-core] has_association? method on ActiveRecord

2014-11-06 Thread Danny Sperry
About a month ago I ran into a case where I needed to know if an AR object's association exists dynamically. I was building a CMS Engine. I thought maybe this was a one off, but last week I found out my co-worker also had a need for this in the CMS he was building. So I've come to the

Re: [Rails-core] has_association? method on ActiveRecord

2014-11-06 Thread Matt Jones
On Nov 6, 2014, at 12:33 AM, Danny Sperry danny.spe...@gmail.com wrote: About a month ago I ran into a case where I needed to know if an AR object's association exists dynamically. I was building a CMS Engine. I thought maybe this was a one off, but last week I found out my co-worker