开发者

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

开发者 https://www.devze.com 2023-04-02 11:39 出处:网络
I\'m building a simple two page Rails application where a user: Enters credit card details on first page and clicks \'Next\'.

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号