Class: Socializer::CommentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Socializer::CommentsController
- Defined in:
- app/controllers/socializer/comments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/controllers/socializer/comments_controller.rb', line 9 def create @comment = current_user.comments.build(params[:comment]) @comment.activity_verb = 'add' # TODO: Is scope needed? Try commenting it out to see what happens @comment.scope = Audience.privacy_level.find_value(:public) @comment.save! redirect_to stream_path end |
#destroy ⇒ Object
26 27 28 29 |
# File 'app/controllers/socializer/comments_controller.rb', line 26 def destroy @comment.destroy redirect_to stream_path end |
#edit ⇒ Object
18 19 |
# File 'app/controllers/socializer/comments_controller.rb', line 18 def edit end |
#new ⇒ Object
5 6 7 |
# File 'app/controllers/socializer/comments_controller.rb', line 5 def new @comment = Comment.new end |
#update ⇒ Object
21 22 23 24 |
# File 'app/controllers/socializer/comments_controller.rb', line 21 def update @comment.update!(params[:comment]) redirect_to stream_path end |