Class: CommentsController

Inherits:
InheritedResources::Base
  • Object
show all
Defined in:
app/controllers/comments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



2
3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/comments_controller.rb', line 2

def create
  create! do |success, failure|
    success.html do
      add_fingerprint_and_user_id(@comment,true)
      add_able_rep("commented on",@comment)
      Reputation.add("commentor",current_user)
      redirect_to :back
    end
    failure.html { redirect_to :back }
  end
end