custom button. How to do this ?

20 views
Skip to first unread message

Roelof Wobben

unread,
Aug 12, 2014, 5:02:57 AM8/12/14
to rubyonra...@googlegroups.com
Hello,

For my project I need a button which produces this in html ;

<button class="btn btn-blue" type="submit">Submit</button>

I tried already  <button tag> and <content_tag> but also that did not produce the output as I expected.


Roelof


Robert Walker

unread,
Aug 12, 2014, 9:06:31 AM8/12/14
to rubyonra...@googlegroups.com
Roelof Wobben wrote in post #1154953:
The button_tag signature:
button_tag(content_or_options = nil, options = nil, &block)

button_tag("Submit", { class: "btn btn-blue" })
=> <button class="btn btn-blue" name="button"
type="submit">Submit</button>

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages