Commit ff4b97c3 by tady

initialize templates page.

parent ae905b24
# 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://coffeescript.org/
// Place all the styles related to the templates controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
class TemplatesController < ApplicationController
def show
end
end
class TemplateDecorator < Draper::Decorator
delegate_all
# Define presentation-specific methods here. Helpers are accessed through
# `helpers` (aka `h`). You can override attributes, for example:
#
# def created_at
# helpers.content_tag :span, class: 'time' do
# object.created_at.strftime("%a %m/%d/%y")
# end
# end
end
module TemplatesHelper
end
...@@ -18,6 +18,9 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation" ...@@ -18,6 +18,9 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
li class=('active' if current_page?(flow_path)) li class=('active' if current_page?(flow_path))
a href=flow_path title="Frow" a href=flow_path title="Frow"
| Flow | Flow
li class=('active' if current_page?(templates_path))
a href=templates_path title="Templates"
| Templates
ul.nav.navbar-nav.navbar-right ul.nav.navbar-nav.navbar-right
li li
......
<h1>Templates</h1>
<p>Find me in app/views/templates/show.html.erb</p>
Rendezvous::Application.routes.draw do Rendezvous::Application.routes.draw do
get 'templates/show'
post 'apis/markdown_preview' post 'apis/markdown_preview'
post 'apis/file_receiver' post 'apis/file_receiver'
get 'apis/user_mention' get 'apis/user_mention'
...@@ -11,6 +13,7 @@ Rendezvous::Application.routes.draw do ...@@ -11,6 +13,7 @@ Rendezvous::Application.routes.draw do
get 'stock' => 'stock#show', as: 'stock' get 'stock' => 'stock#show', as: 'stock'
get 'flow' => 'flow#show', as: 'flow' get 'flow' => 'flow#show', as: 'flow'
get 'search' => 'search#show', as: 'search' get 'search' => 'search#show', as: 'search'
get 'templates' => 'templates#show', as: 'templates'
get 'posts/:id/fork' => 'posts#fork', as: 'fork_post' get 'posts/:id/fork' => 'posts#fork', as: 'fork_post'
post 'posts/:id/mail' => 'posts#mail', as: 'mail_post' post 'posts/:id/mail' => 'posts#mail', as: 'mail_post'
......
require 'rails_helper'
RSpec.describe TemplatesController, :type => :controller do
describe "GET 'show'" do
it "returns http success" do
get 'show'
expect(response).to be_success
end
end
end
require 'spec_helper'
describe TemplateDecorator do
end
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the TemplatesHelper. For example:
#
# describe TemplatesHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe TemplatesHelper, :type => :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
require 'rails_helper'
RSpec.describe "templates/show.html.erb", :type => :view do
pending "add some examples to (or delete) #{__FILE__}"
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment