Notes: Adding themes to rails app

To add themes to a rails app

  • Drop respective css and javascript files into appropriate directory under vendor/assets/.
    Note: Files should have unique name (I name them after the theme so flatty-theme/css/style.css simply becomes flatty.css.
  • Add the following code to your config/application.rb under # add custom validators path in the Application class

    config.assets.paths << "#{Rails.root}/vendor/assets/*"
    config.assets.paths << "#{Rails.root}/vendor/assets/fonts"
    config.assets.paths << "#{Rails.root}/vendor/assets/stylesheets"
  • Adjust whatever views you’re using to use the appropriate classes in your theme

…And that’s it!

Advertisements
Notes: Adding themes to rails app

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s