New topic button

This commit is contained in:
Rei
2014-01-05 19:44:46 +08:00
parent a7e6af811e
commit bc24a0dfb7
4 changed files with 21 additions and 5 deletions

View File

@@ -8,9 +8,9 @@ html
= csrf_meta_tags
body
.ui.inverted.main.menu
.ui.main.menu
.container
.title.item
a.title.item href="/"
| Campo
.right.menu
- if logined?

View File

@@ -0,0 +1,12 @@
.ui.stacked.segment
.ui.grid
.middle.aligned.row.two.column
.column
.ui.huge.breadcrumb
.active.section Topics
.column.right.aligned
a.ui.button href=new_topic_path
| New Topic
.ui.secondary.pointing.menu
a.active.item Hot
.ui.grid

View File

@@ -11,4 +11,6 @@ Rails.application.routes.draw do
get :check_username
end
end
resources :topics, only: [:new, :create, :edit, :update]
end

View File

@@ -1,7 +1,9 @@
require 'test_helper'
class TopicsControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
test "should get index" do
3.times { create(:topic) }
get :index
assert_response :success, @response.body
end
end