Search code examples
ruby-on-railsactivemodel

Should I use ActiveModel for this simple non-database Rails application?


I'm building a simple two page Rails application where a user:

  1. Enters credit card details on first page and clicks 'Next'.
  2. Enters billing address on second page and clicks 'Submit'.

I will have an overall Order model that will validate the data entered.

I don't require a database for this application as I'll be storing data in session between pages. Should I use ActiveModel for something so simple?


Solution

  • I think you should use ActiveModel only if you want to validate your input data. And if not - you can just use session. Also this would be helpful: ActiveModel railscast

    if you haven't seen it.