Template Integration In Rails Application

Hello Guys,
New Template Integration:
1. Sylesheets
=> application.css
*= require ‘css1’
*= require ‘css1’
*= require ‘css1’
*= require ‘css1’
*= require_tree . 
  Note: It will include all the sytlesheets directory css files
2. Javascripts
=> application.js
//= require ‘/newfolder/js1’
//= require ‘js2’
//= require ‘js3’
//= require ‘js4’
//= require_tree .
Note: It will include all the javascripts directory js files
3. Images
Include all the Images in Directory of assets folder
4. Font
Include all you in Fonts Directory of assets folder
5. Layout
<!DOCTYPE html>
  <%= stylesheet_link_tag “application” %>
  <%= javascript_include_tag “application” %>  
  <%= csrf_meta_tags %>
  <% if notice %>
    <p class=”alert alert-success”><%= notice %></p>
  <% end %>
  <% if alert %>
    <p class=”alert alert-danger”><%= alert %></p>
  <% end %>
  <%= yield %>
6. Create Controller
Filename: welcome_controller.rb
class WelcomeController < ApplicationController
def index;end
7. Define Routes
resources :welcome
8. Views => welcome folder => create => index.html.erb
Here you paste all html content
9. Start you browser and then see your template

About the author

Being the CEO and Founder of ClecoTech International, Mr. Ashish Prajapati is dedicated towards his aim of mentoring young startups into a full-fledged businesses. He is helping startups from America, Europe, India, and various other countries through proper guidance and the use of latest technologies to develop their innovation and ideas into definite realities.

Leave a Reply

Your email address will not be published. Required fields are marked *