class RecipeStep < ActiveRecord::Base

  belongs_to :recipe, inverse_of: :recipe_steps

  validates :step, presence: true
  validates :sort_order, presence: true

  def log_copy
    copy = RecipeStep.new
    copy.sort_order = self.sort_order
    copy.step = self.step

    copy
  end

end
