On 15 October 2016 at 10:07, Usman Shahid <usman.shaa...@gmail.com> wrote:
> I cannot find an alternative to this. What i'm trying to do is write a
> generic interface which can answer generic queries like search based on
> specific column and aggregate queries etc. Underlying table is provided to
> the Model on initialization and I want it hooked with that table so that I
> can run these active record generic queries (and some generic extensions)
> on the underlying table.
> Also, how do I hack it? Is there any downside of doing it?
If you want methods available in a number of models you can derive an
intermediary class from ActiveRecord base, provide the methods in there,
and derive your models from the intermediary.
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 post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.