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

      # if we have no definition
      return nil if @definition.nil? or !@definition.key?( :form )

      # normalise things if we’ve not done it already
      unless @definition[:form].key?( :_normalised )

        @definition[:form][:fields]      = normalise_form_fields
        @definition[:form][:_normalised] = true

      end

      # return the fields
      @definition[:form]

    end
# Returns the form definition for this controller, if specified
Returns the form definition for this controller, if specified
Returns the form definition for this controller if specified
def form_definition
      return nil if @definition.nil? or !@definition.key?( :form )
      unless @definition[:form].key?( :_normalised )
        @definition[:form][:fields]      = normalise_form_fields
        @definition[:form][:_normalised] = true
      end
      @definition[:form]
    end
def form_definition return nil if @definition . nil? or ! @definition . key? ( :form ) unless @definition [ :form ] . key? ( :_normalised ) @definition [ :form ] [ :fields ] = normalise_form_fields @definition [ :form ] [ :_normalised ] = true end @definition [ :form ] end
Returns the form definition for this controller, if specified
Returns the form definition for this controller if specified
# if we have no definition # normalise things if we’ve not done it already # return the fields