Does Forme::Form.new accept a Hash of field values as implied by README? #125
ScottGrimmett
started this conversation in
General
Replies: 1 comment
-
If you keep reading the README a little longer, in the https://forme.jeremyevans.net/files/README_rdoc.html#label-Forme-3A-3AForm+Creation section, it explains that non-hash arguments are treated differently than hash arguments. It also explains to use the f = Forme::Form.new(obj: {foo: "bar"})
f.input(:foo)
# => "<input id=\"foo\" name=\"foo\" type=\"text\" value=\"bar\"/>" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm unable to puzzle out the documentation at https://forme.jeremyevans.net that reads:
I've pasted the example code into my own project, and verified the output as described. This seems to work because #first is a method of Array. However, the documentation leads me to expect that:
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions