ruby-on-railsthemesintegrate

How to integrate purchased theme with rails 5 application ?


I have purchased flatkit theme from themeforst but I don't know how to integrate purchased theme with rails 5 application ?


Solution

  • I got the solution.

    Step1: Place the asset files in vendor directory.

    Step2: Import required css & scss file by add require statement in application.css

    ex) *=require assets/animate.css/animate.min.css

    note: animate.min.css stored in location app-directory/vendor/assets/animate.css

    step3: Import required js files by add require statement in application.js

    ex) //= require html/scripts/ui-nav.js

    note: ui-nav.js stored in location app-dir/vendor/html/scripts/ui-nav.js

    Step4: Configure asset path by add following statement in assets.rb Rails.application.config.assets.paths << Rails.root.join('vendor')

    Now you can access your theme future.