Class: CommentsController

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



6
7
8
9
10
# File 'app/controllers/comments_controller.rb', line 6

def destroy
  @post_activity = resource.post_activity

  destroy!
end

#showObject



12
13
14
15
# File 'app/controllers/comments_controller.rb', line 12

def show    
  parent = resource.post_activity.parent
  redirect_to polymorphic_path(parent.direct_object,:anchor => dom_id(parent))
end