Question

I'm using ruby 1.8.7 and rails 3.2.14. I'm following the railscast video #184 on using formtastic. In there the guy uses script/generate formtastic_stylesheets. Since I'm using ruby 3.2.14 I did rails generate formtastic_stylesheets but this brings up the error: Could not find generator formtastic_stylesheets . Does anyone know the correct way to scaffold the needed stylesheets, or is there a more recent tutorial and/or gem on creating forms?

Thank you!

Was it helpful?

Solution

From the section about stylesheets in the Formtastic README:

Rails 3.1 introduces an asset pipeline that allows plugins like Formtastic to serve their own Stylesheets, Javascripts, etc without having to run generators that copy them across to the host application. Formtastic makes three stylesheets available as an Engine, you just need to require them in your global stylesheets.

# app/assets/stylesheets/application.css
*= require formtastic
*= require my_formtastic_changes`

Perhaps that's what you're looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top