I’d like to set the
lesson_date on a
Date.current when the lesson record is first created. It should not be changed after creation.
I hacked it together at the start using a hidden field on the
new_lesson form but I want to move it to the model instead.
I thought the following would do the trick but it’s being called after creation too:
before_save :set_lesson_date, on: :create
What’s the correct before_filter for achieving this?
I’m on Rails 3.2.14 and ruby 1.9.3p448