rails使用bootstrap-sass而不是twitter-bootstrap-rails生成bootstrap布局

Has*_*bal 7 ruby-on-rails ruby-on-rails-3 twitter-bootstrap-rails bootstrap-sass

我不得不选择bootstrap-sass,twitter-bootstrap-rails并且我根据网络上的建议选择了第一个.

但是,我看到twitter-bootstrap-railsgem有一些用于应用程序布局的生成器.喜欢,

rails g bootstrap:layout application fixed
rails g bootstrap:themed Posts
Run Code Online (Sandbox Code Playgroud)

我认为这对于启动项目非常有用.但我没有在bootstrap-sass宝石中找到类似的发电机.运行命令:

rails generate 
Run Code Online (Sandbox Code Playgroud)

没有像以前那样显示任何生成器.

有没有办法让这些布局使用bootstrap-sass而不是使用twitter-bootstrap-rails

提前致谢.

小智 8

在那里你可以找到一个为bootstrap-sass生成主题的好方法:

https://github.com/doabit/bootstrap-sass-extras

基本上你只是:

 rails g scaffold Post title:string description:text
 rake db:migrate
 rails g bootstrap:themed Posts
Run Code Online (Sandbox Code Playgroud)


Cla*_*u S 4

我正在使用这个 gem,尽管我不知道它的生成器。

我在 GitHub 上找到了一个 gem,你可能会觉得有用:

https://github.com/decioferreira/bootstrap-generators

或者,您可以简单地定义一个新的 custom.css.scss 文件并开始使用整个应用程序的 css。并且不要忘记将引导导入添加到您的文件中!