Skip to content

Commit

Permalink
Merge pull request #1764 from budnik/patch-1
Browse files Browse the repository at this point in the history
Fixes examples syntax
  • Loading branch information
dblock authored May 30, 2018
2 parents 6876b71 + 03f7e4c commit d845a3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,8 @@ module SharedParams
extend Grape::API::Helpers

params :order do |options|
optional :order_by, type:Symbol, values:options[:order_by], default:options[:default_order_by]
optional :order, type:Symbol, values:%i(asc desc), default:options[:default_order]
optional :order_by, type: Symbol, values: options[:order_by], default: options[:default_order_by]
optional :order, type: Symbol, values: %i(asc desc), default: options[:default_order]
end
end

Expand All @@ -1827,7 +1827,7 @@ class API < Grape::API

desc 'Get a sorted collection.'
params do
use :order, order_by:%i(id created_at), default_order_by: :created_at, default_order: :asc
use :order, order_by: %i(id created_at), default_order_by: :created_at, default_order: :asc
end

get do
Expand Down

0 comments on commit d845a3a

Please sign in to comment.