class CmAdmin::Model

def initialize(entity, &block)

def initialize(entity, &block)
  @name = entity.name
  @ar_model = entity
  @is_visible_on_sidebar = true
  @icon_name = 'fa fa-th-large'
  @available_actions ||= []
  @current_action = nil
  @available_tabs ||= []
  @available_fields ||= {index: [], show: [], edit: {fields: []}, new: {fields: []}}
  @params = nil
  @filters ||= []
  instance_eval(&block) if block_given?
  actions unless @actions_set
  $available_actions = @available_actions.dup
  define_controller
end