增加时间线

This commit is contained in:
yafeilee 2014-03-30 08:16:38 +08:00
parent 4d6f059c17
commit 20441526e7
5 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,9 @@
class ArchivesController < ApplicationController
def index
@posts = Post.all
end
def archive_params
params.permit(:type)
end
end

View File

@ -0,0 +1,23 @@
ul
li
a href="#" 科学是什么
p
| 分类:
span 技术
| 标签:
span 生活, 感悟
| 浏览数:
span 1010
| 喜欢:
span 10
li
a href="#" 科学是什么
p
| 分类:
span 技术
| 标签:
span 生活, 感悟
| 浏览数:
span 1010
| 喜欢:
span 10

View File

@ -32,7 +32,7 @@ html
li li
label Archive label Archive
li li
a href="#" 时间线 = link_to '时间线', archives_path
li li
label AboutMe label AboutMe
a href="#" 关于我 a href="#" 关于我

View File

@ -6,6 +6,7 @@ WBlog::Application.routes.draw do
end end
end end
resources :archives
# photos # photos
resources :photos, :only=>[:create] resources :photos, :only=>[:create]

View File

@ -0,0 +1,12 @@
require 'spec_helper'
describe ArchivesController do
describe "GET 'index'" do
it "returns http success" do
get 'index'
response.should be_success
end
end
end