Is it possible to serialize the "query builder data" part of ActiveRecord::Relation and use it later

12 views
Skip to first unread message

Anton Kuzmin

unread,
Dec 3, 2013, 12:55:48 PM12/3/13
to rubyonra...@googlegroups.com
Is it possible to serialize the "query builder data" part of ActiveRecord::Relation and use it later to query the database with exactly the same query?

to_sql is not suitable

My task is to have reload a div that contains a list of records got from DB. It can be taken from DB via simple search, detailed search, via selecting a category, selecting an item in category, so I thought that the simplest way is to store serialized and encrypted query data inside a div, which can be used to refresh itself.

Maybe there is an alternative way I don't know of?
Reply all
Reply to author
Forward
0 new messages