ruby on rails - Getting a HAML button_to work with twitter bootstrap -


i trying apply basic formatting ruby on rails app using twitter bootstrap. create button group 3 buttons having trouble haml file.

after looking through twitter bootstrap documentation, think problem bootstrap style-sheet expecting <button> elements (with proper classes) place in button group.

i using button_to helper in haml file not appear produce <button> tag. but, not experienced enough in haml know way around this.

is there way make button_to element generate <button> tag, or should attacking problem in different way?

if you're trying button tag in haml can use %button tag generate it.

in order change class able %button.class

ex.

%button.alert   test 

would generate

<button class="alert">test</button> 

edit:

just bit extra, while i'm not experienced using bootstrap (i used foundation), if you're interested in using button_to you're allowed declare class, though won't generate tag you're looking part not related question.

= button_to 'example, {:controller => 'your_controller', :action => 'your_action'}, {:class => 'your button class', :method => 'post'} 

however generate

<input class="small button" type="submit" value="example"> 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -