简体   繁体   中英

Ruby on Rails : twitter-bootstrap-rails generate a controller

Hi in my rails app im using the twitter-bootstrap framework. I've generate a controller

rails g controller controller_name action1 action2

how i can add bootstrap to the views?

Can i use a generator?

Assuming you installed gem 'twitter-bootstrap-rails' gem.

You just need to run generator rails generate bootstrap:install static that will install all related files into your application.

Once you done with this, you can generate your layout and theme, like an example rails g bootstrap:themed Posts

You can find more details from twitter-bootstrap-rails

You can view video tutorial from railscasts Twitter Bootstrap Basics

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM