Permalink
Browse files

Instala gem meta-tags. Adiciona titulo e h1 nas paginas

  • Loading branch information...
Godoy committed Mar 3, 2015
1 parent 18cbd0f commit 51b180b5b32d5a9e18858c3c5a34f77edebb36e7
View
@@ -42,4 +42,5 @@ gem "paperclip", "~> 4.2"
gem "rails_admin"
gem "bootstrap-sass", "~> 3.3.3"
gem "faker"
gem "faker"
gem "meta-tags"
View
@@ -71,6 +71,8 @@ GEM
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta-tags (2.0.0)
actionpack (>= 3.0.0)
mime-types (1.25.1)
mini_portile (0.6.2)
minitest (5.5.1)
@@ -167,6 +169,7 @@ DEPENDENCIES
faker
jbuilder (~> 2.0)
jquery-rails
meta-tags
paperclip (~> 4.2)
rails (= 4.1.5)
rails_admin
@@ -3,6 +3,7 @@ class EventsController < ApplicationController
def index
@events = Event.all
@page_title = 'Eventos'
end
def show
@@ -11,5 +12,6 @@ def show
private
def set_event
@event = Event.find(params[:id])
@page_title = @event.title
end
end
@@ -3,6 +3,8 @@ class NewsController < ApplicationController
def index
@news = News.all
@page_title = 'Notícias'
end
def show
@@ -11,5 +13,7 @@ def show
private
def set_news
@news = News.find(params[:id])
@page_title = @news.title
end
end
@@ -1,4 +1,5 @@
class PagesController < ApplicationController
def home
@page_title = 'Projeto Exemplo'
end
end
@@ -1,4 +1,5 @@
<h1>Events#index</h1>
<h1><%= title %></h1>
<p>Find me in app/views/events/index.html.erb</p>
<ul>
@@ -1,4 +1,5 @@
<h1>Events#show</h1>
<h1><%= title %></h1>
<p>Find me in app/views/events/show.html.erb</p>
<%= @event.title %>
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RailsSeo</title>
<%= display_meta_tags :site => 'SEO no Rails', :reverse => true %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
@@ -1,4 +1,4 @@
<h1>News#index</h1>
<h1><%= title %></h1>
<p>Find me in app/views/news/index.html.erb</p>
<ul>
@@ -1,4 +1,5 @@
<h1>News#show</h1>
<h1><%= title %></h1>
<p>Find me in app/views/news/show.html.erb</p>
<%= @news.title %>
@@ -1,4 +1,5 @@
<h1>Pages#home</h1>
<h1><%= title 'SEO no Rails - Projeto Exemplo' %></h1>
<p>Find me in app/views/pages/home.html.erb</p>
<%= link_to 'Notícias', news_index_path %>

0 comments on commit 51b180b

Please sign in to comment.