Ruby on Rails
Thursday, April 19, 2018
For ActiveRecord in Rails 2.3, you can use
-- .construct_finder_sql({})
tonypm
On Saturday, 14 April 2018 15:13:15 UTC+1, Hassan Schroeder wrote:
On Saturday, 14 April 2018 15:13:15 UTC+1, Hassan Schroeder wrote:
On Fri, Apr 13, 2018 at 10:13 PM, nyt1972 <nyt...@gmail.com> wrote:
> I want to ask Is there any tool to convet ActiveRecord 2.3.5 statement to
> sql?
If it's a one-time or occasional thing, just execute the statement
and grab the query SQL from your logs.
There are also `to_sql()` methods in ActiveRecord::Relation and
ActiveRecord::ConnectionAdapters:: DatabaseStatements which
(hint) you could find by searching the docs.
HTH,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
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/baa4af28-9d4d-42be-b82f-473537327f1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment