Class: Rostra::Base::CommentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rostra/base/comments_controller.rb

Direct Known Subclasses

CommentsController

Instance Method Summary collapse

Methods inherited from ApplicationController

#can_participate_in_rostra?, #main_app_login_path, #main_app_signup_path, #rostra_user

Methods included from Config

setup

Instance Method Details

#createObject



8
9
10
11
12
# File 'app/controllers/rostra/base/comments_controller.rb', line 8

def create
  if @comment.save
    redirect_to @question
  end
end

#destroyObject



19
20
21
22
# File 'app/controllers/rostra/base/comments_controller.rb', line 19

def destroy
  @comment.destroy
  redirect_to @question
end

#updateObject



14
15
16
17
# File 'app/controllers/rostra/base/comments_controller.rb', line 14

def update
  @comment.update_attributes(:comment => params[:value])
  render :text => @comment.comment
end