Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: elomar/microblog
base: 8f741e651d
...
head fork: elomar/microblog
compare: a5894b3bd1
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 10 files changed
  • 0 commit comments
  • 1 contributor
View
3  app/assets/javascripts/paginas.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3  app/assets/stylesheets/paginas.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Paginas controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
10 app/controllers/paginas_controller.rb
@@ -0,0 +1,10 @@
+class PaginasController < ApplicationController
+ def index
+ end
+
+ def ajuda
+ end
+
+ def sobre
+ end
+end
View
2  app/helpers/paginas_helper.rb
@@ -0,0 +1,2 @@
+module PaginasHelper
+end
View
2  app/views/layouts/application.html.erb
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Microblog</title>
+ <title>MicroBlog IT | <%= yield :title %></title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
View
4 app/views/paginas/ajuda.html.erb
@@ -0,0 +1,4 @@
+<% provide :title, "Ajuda" %>
+
+<h1>Ajuda</h1>
+<p>Para ajuda sobre Rails consulte o <a href="http://google.com">google</a>.</p>
View
4 app/views/paginas/index.html.erb
@@ -0,0 +1,4 @@
+<% provide :title, "Início" %>
+
+<h1>MicroBlog</h1>
+<p>Está é uma aplicação exemplo pro módulo de Rails.</p>
View
4 app/views/paginas/sobre.html.erb
@@ -0,0 +1,4 @@
+<% provide :title, "Sobre" %>
+
+<h1>Sobre</h1>
+<p>O Curso de Rails da IT é um curso sobre Rails na IT.</p>
View
4 config/routes.rb
@@ -1,4 +1,8 @@
Microblog::Application.routes.draw do
+ get "paginas/index"
+ get "paginas/ajuda"
+ get "paginas/sobre"
+
# The priority is based upon order of creation:
# first created -> highest priority.
View
41 spec/requests/paginas_spec.rb
@@ -0,0 +1,41 @@
+# encoding: utf-8
+
+require 'spec_helper'
+
+describe "Páginas" do
+ describe "Inicial" do
+ it "deve ter o conteúdo 'MicroBlog'" do
+ visit "/paginas/index"
+ page.should have_content("MicroBlog")
+ end
+
+ it "Deve ter o título 'Início'" do
+ visit '/paginas/index'
+ page.should have_selector('title', text: "MicroBlog IT | Início")
+ end
+ end
+
+ describe "Ajuda" do
+ it "deve ter o conteúdo 'Ajuda'" do
+ visit "/paginas/ajuda"
+ page.should have_content("Ajuda")
+ end
+
+ it "Deve ter o título 'Ajuda'" do
+ visit '/paginas/ajuda'
+ page.should have_selector('title', text: "MicroBlog IT | Ajuda")
+ end
+ end
+
+ describe "Sobre" do
+ it "deve ter o conteúdo 'Sobre'" do
+ visit "/paginas/sobre"
+ page.should have_content("Sobre")
+ end
+
+ it "Deve ter o título 'Sobre'" do
+ visit '/paginas/sobre'
+ page.should have_selector('title', text: "MicroBlog IT | Sobre")
+ end
+ end
+end

No commit comments for this range

Something went wrong with that request. Please try again.