Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ganmacs committed Nov 30, 2017
1 parent ca10d01 commit c38154d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class RecipesController < ApplicationController
string :quantity do |value|
value =~ /\A\d+(?:\.\d+)g\z/
end
date :date, only: ["%Y/%m/%d", "%Y.%m.%d"]
time :time, only: "%Y/%m/%d %H:%M:%S"
date :date, format: ["%Y/%m/%d", "%Y.%m.%d"]
time :time, format: "%Y/%m/%d %H:%M:%S"
end

def create
Expand Down Expand Up @@ -70,6 +70,7 @@ irb(main):005:0> app.post "/recipes", name: "alice", type: "bob"
* except
* handler
* strong
* format (only for date and time)

## Tips
WeakParameters.stats returns its validation metadata, and this is useful for auto-generating API documents.
Expand Down

0 comments on commit c38154d

Please sign in to comment.