How can I use a css with the Ruby on rails application ????

 How can I use a css with the Ruby on rails application ???? 

...........................................................................................................................


1. Put the CSS files in public/stylesheets and then use:

<%= stylesheet_link_tag "filename" %>
<%= stylesheet_link_tag "main" %>
2. Go to ::   config/initializers/assets.rb  :: Add this below main css file in the assets.rb 
Rails.application.config.assets.version = '1.0'
Rails.application.config.assets.precompile += %w( main.css )

Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5