开发者

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?


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜