문제

Redis를 데이터베이스와 ohm으로 사용하여 ActiveRecord 교체로 사용하고 있습니다.

객체를 만드는 양식을 만들 때 Form_For ViewHelper를 사용하여 객체를 편집하고 생성하기 위해 양식을 만들 수 있습니다.

ohm for work

최고의 안부, 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top