This commit is contained in:
parent
926283398b
commit
86020804c9
|
@ -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
|
|
@ -1,2 +0,0 @@
|
|||
module DiscussDemoHelper
|
||||
end
|
|
@ -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 %>
|
|
@ -1,2 +0,0 @@
|
|||
<h1><%= @discuss_demo.title %></h1>
|
||||
<%= textAreailizable @discuss_demo.body %>
|
Loading…
Reference in New Issue