|
|
|
@ -56,6 +56,7 @@ private |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def prepare_for_editing |
|
|
|
|
if request.post? |
|
|
|
|
@query.filters = {} |
|
|
|
|
@query.add_filters(params[:fields] || params[:f], params[:operators] || params[:op], params[:values] || params[:v]) if params[:fields] || params[:f] |
|
|
|
|
@query.attributes = params[:query] |
|
|
|
@ -65,6 +66,7 @@ private |
|
|
|
|
@query.column_names = params[:c] if params[:c] |
|
|
|
|
@query.column_names = nil if params[:default_columns] |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def find_query |
|
|
|
|
@query = Query.find(params[:id]) |
|
|
|
|