Ruby on Rails
Sunday, July 12, 2015
Ransack
Seems like a promising for your usecase. Take a look at it.
On Mon, Jul 13, 2015 at 5:40 AM, joe@via.net <joe@via.net> wrote:
class Asset < ActiveRecord::Base--belongs_to :site# class variable :nameendclass Site < ActiveRecord::Basehas_many :assets# class var x, y, zendIs there a dynamic finder that will traverse the inner join:e.g. Site.find_by_asset_name("xyzzy")Can I get a list of sites where asset.name == "BAZ"Can this be done in AR or do I have to resort to SQL?Thanks,Joe
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7f72701d-cd1c-4219-b4e3-1aa5b643a895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Regards
Vineeth B S
Vineeth B S
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAAk7vin%2BKX-eC%2BJe1R4sDPv1mwuqX0motp%3DFB0HyJcJBye0xuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment