Roy
Roy

Reputation: 277

How to put bootstrap button in haml/html file

I have this link in my haml file:

Delete', booking, :method => :delete, :data => { :confirm => 'Are you sure?' }

How can I make it into a bootstrap button (I've installed the right gems already)

I know I need to use %button.btn.btn-default, but how do I do it with the code above?

Upvotes: 2

Views: 1661

Answers (1)

Arvind
Arvind

Reputation: 2779

have you tried this

link_to 'Delete', booking, :method => :delete, data => {:confirm => 'Are you sure?'}, :class => 'btn btn-default'

it might have some issue as you are adding button css to link

Upvotes: 4

Related Questions