Closed eliasjpr closed 6 years ago
We should also make a link like link(opts, &block)
for multi line text inside, ex: glyphicons or other icons and text.
@eliasjpr should the button helper create a form with a single input? like https://apidock.com/rails/ActionView/Helpers/UrlHelper/button_to
Same with adding a :method
option so that you can have a link submit with another http verb.
Yes, something like
button("hello", to: "/world")
#=> <form action="/world" class="button" method="post">
<input name="_csrf_token" value="">
<button type="submit">hello</button>
</form>
button("hello", to: "/world", method: "get", class: "btn")
#=> <form action="/world" class="btn" method="get">
<button type="submit">hello</button>
</form>
@eliasjpr Working on it, and right now you don't have to use the to: as it assumes that :url
is the second or first item, depending if a block is given.
Is this already fixed? @eliasjpr
Is there any issue about creating a link_to Controller, :action
?
Addressed with https://github.com/amberframework/jasper-helpers/pull/18
Acceptance Criteria