This commit is contained in:
lizanle 2015-03-17 09:42:04 +08:00
parent 926283398b
commit 86020804c9
4 changed files with 0 additions and 38 deletions

View File

@ -1,27 +0,0 @@
class DiscussDemoController < ApplicationController
def index
@discuss_demo_list = DiscussDemo.order("created_at desc").page(params[:page] || 1).per(10)
end
def new
end
def create
discuss_demo = DiscussDemo.new(:title => params[:discuss_demo][:title],:body =>params[:discuss_demo][:body])
discuss_demo.save!
redirect_to :controller=>'discuss_demo',:action => 'show',:id => discuss_demo.id
end
def update
end
def delete
end
def show
@discuss_demo = DiscussDemo.find(params[:id])
end
end

View File

@ -1,2 +0,0 @@
module DiscussDemoHelper
end

View File

@ -1,7 +0,0 @@
<%= javascript_include_tag src='/assets/kindeditor/kindeditor' %>
<h1>新建文章</h1>
<%= form_for :discuss_demo do |f| %>
<%= f.text_field :title %>
<%= f.kindeditor :body %>
<%= f.submit :value=> '提交' %>
<% end %>

View File

@ -1,2 +0,0 @@
<h1><%= @discuss_demo.title %></h1>
<%= textAreailizable @discuss_demo.body %>