Permalink
Browse files

Fix for query single request level

  • Loading branch information...
1 parent e610bac commit fa6222b2856f959305c688160cb84f7f0b116f33 @seejohnrun committed Mar 29, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/flexible_api_server.rb
@@ -152,9 +152,8 @@ def free_render(code, hash = '') # blank by default, not nil
return free_render 200, nil if query.nil?
- options = { :request_level => requested_level }
if query.is_a?(ActiveRecord::Base)
- free_render 200, query.to_hash(options)
+ free_render 200, query.to_hash(requested_level)
else
# Scope it
query = add_scopes(query, scope_param)
@@ -163,7 +162,7 @@ def free_render(code, hash = '') # blank by default, not nil
free_render 200, :count => query.count
else
query = add_limit_and_offset(query)
- free_render 200, query.find_all_hash(options)
+ free_render 200, query.find_all_hash(:request_level => requested_level)
end
end
end

0 comments on commit fa6222b

Please sign in to comment.