* bump * I think this would be a useful feature to have
On Monday, March 14, 2016 at 1:45:51 PM UTC-5, lingceng wrote:
>
> I know it's been a long time from the last reply.
> But I really want some method return raw results in ActiveRecord.
>
> Actually I use ActiveRecord as a sql builder for some complex query. And
> it's useful in most cases.
> I added a patch for my project to do the following query:
>
> PayRecord.group(:settlement_id, :pm).having('count(*) >
> 1').select("count(*), id, settlement_id, pm").select_all
>
> Here's the patch
>
> class ActiveRecord::Relation
> def select_all
> @klass.connection.select_all(self.to_sql)
> end
> end
>
> @Rafael Mendonça França What's the schedule of this feature?
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.