def _create_record
        # check if class has custom create method
        if self.class.custom_create_method
          # run before/after callbacks defined in model
          run_callbacks(:create) do
            # timestamp
            if self.record_timestamps
              current_time = current_time_from_proper_timezone

              all_timestamp_attributes_in_model.each do |column|
                if respond_to?(column) && respond_to?("#{column}=") && self.send(column).nil?
                  write_attribute(column.to_s, current_time)
                end
              end
            end
            # run
            create_using_custom_method
          end
        else
          super
        end
      end
def _create_record
        # check if class has custom create method
        if self.class.custom_create_method
          # run before/after callbacks defined in model
          run_callbacks(:create) do
            # timestamp
            if self.record_timestamps
              current_time = current_time_from_proper_timezone

              all_timestamp_attributes_in_model.each do |column|
                if respond_to?(column) && respond_to?("#{column}=") && self.send(column).nil?
                  write_attribute(column.to_s, current_time)
                end
              end
            end
            # run
            create_using_custom_method
          end
        else
          super
        end
      end
Creates a record with custom create method
 and returns its id.