app/controllers/concerns/admin/cms/definitions.rb
def load_definition_file

      # get a base path
      path = Rails.root.join( 'app/views', controller_path )
      candidates = Dir.glob( path.join( '*.{yml,yaml}' ))

      # if it didn’t work
      return if candidates.empty?

      # otherwise, load the file
      @definition = YAML.load_file( candidates.first ).deep_symbolize_keys

    end
# Loads the definition file for the current controller.
Loads the definition file for the current controller.
Loads the definition file for the current controller .
def load_definition_file
      path = Rails.root.join( 'app/views', controller_path )
      candidates = Dir.glob( path.join( '*.{yml,yaml}' ))
      return if candidates.empty?
      @definition = YAML.load_file( candidates.first ).deep_symbolize_keys
    end
def load_definition_file path = Rails . root . join ( 'app/views' , controller_path ) candidates = Dir . glob ( path . join ( '*.{yml,yaml}' ) ) return if candidates . empty? @definition = YAML . load_file ( candidates . first ) . deep_symbolize_keys end
Loads the definition file for the current controller.
Loads the definition file for the current controller .
# get a base path # if it didn’t work # otherwise, load the file