RedisとOhmで、そしてactiveRecordのないフォームの使い方は?
-
15-11-2019 - |
質問
DESIVERCORDの交換としてデータベースとOHMとしてRedisを使用しています。
オブジェクトを作成するためのフォームを作成すると、form_for ViewHelperを使用して、オブジェクトを編集して作成するためのフォームを簡単に作成できます。
オームのためのものはありますか?
最高の敬意、Hijolan
解決
class MyShinyModel < Ohm::Model
include ActiveModel::SomeModule
# ...
end
And proceed like desribed here http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/ or here http://asciicasts.com/episodes/219-active-model.
他のヒント
There should be no correlation between the ORM you are using and the ActionView form helpers. As long as OHM is an implementation of the ActiveModel API, it should just work as expected.
所属していません StackOverflow