Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[教育訓練] Rails Validation Basic

HeChien Hsu
September 04, 2012

[教育訓練] Rails Validation Basic

HeChien Hsu

September 04, 2012
Tweet

More Decks by HeChien Hsu

Other Decks in Technology

Transcript

  1. 會經過驗證的 • create • create! • save • save! •

    update • update_attributes • update_attributes!
  2. 不會經過驗證的 decrement! • decrement_counter • increment! • increment_counter • toggle!

    • touch • update_all • update_attribute • update_column • update_counters
  3. helpers • acceptance • confirmation • exclusion • format •

    uniqueness • inclusion • length • numericality • presence • size • validates_associated