Sha256: 2ccec54aa281478a2e793b4be4333d38f5498a7ed386a38a8d59b93e05999f2c

Contents?: true

Size: 964 Bytes

Versions: 2

Compression:

Stored size: 964 Bytes

Contents

class CommentsController < ApplicationController
  # Define your restrict methods and use them like this:
  #
  # before_action :user_required,      except: [:index, :create]
  # 
  # before_action :owner_required,     only: [:my, :incoming, :edit, :trash]
  # before_action :moderator_required, only: [:update, :to_published, :to_draft, :to_spam, :to_trash]

  include TheCommentsController::Base

  # Public methods:
  #
  # [:index, :create]

  # Application side methods:
  # Overwrite following default methods if it's need
  # Following methods based on *current_user* helper method
  # Look here: https://github.com/the-teacher/the_comments/blob/master/app/controllers/concerns/the_comments_controller.rb#L62
  #
  # [:my, :incoming, :edit, :trash]

  # You must protect following methods
  # Only comments moderator (holder or admin) can invoke following actions
  #
  # [:update, :to_published, :to_draft, :to_spam, :to_trash]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
the_comments-1.1.0 lib/generators/the_comments/templates/comments_controller.rb
the_comments-1.0.0 lib/generators/the_comments/templates/comments_controller.rb