mberlanda/cheidelacoriera

View on GitHub
app/controllers/crud/posts_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
# frozen_string_literal: true

class Crud::PostsController < CrudController
  before_action :authenticate_user!
  before_action :admin_user?

  self.permitted_attrs = %i[title image_url content date]
  self.search_columns = %i[title image_url content date]

  include DatatableController

  def datatable_columns
    %i[title image_url content date]
  end
end