app/models/note.rb
# Notes can have one of two types of titles: a custom title, or a title from the list of note_titles.
# When saving a note, we want only one title.  We give preference to note_title_id by setting
# custom_note_title = "" if note_title_id is set.
Notes can have one of two types of titles: a custom title, or a title from the list of note_titles.
When saving a note, we want only one title.  We give preference to note_title_id by setting
custom_note_title = "" if note_title_id is set.
Notes can have one of two types of titles : a custom title or a title from the list of note_titles . When saving a note we want only one title . We give preference to note_title_id by setting custom_note_title = " " if note_title_id is set .
def determine_title
    unless self.note_title_id.blank?
      self.custom_note_title = ""
    end
  end
def determine_title unless self . note_title_id . blank? self . custom_note_title = "" end end
Notes can have one of two types of titles: a custom title, or a title from the list of note_titles.
Notes can have one of two types of titles : a custom title or a title from the list of note_titles .