Java Objects as ActiveModel Objects

I am writing a Rails app and my model layer is written in Java. I have
services written in Java that return these model objects. My problem is
that I would like to use some of the Rails niceties that come from using
ActiveModel objects but I am having a hard time figuring out how to get
java models to behave like ActiveModel objects fully. Has anyone had
experience with this kind of architecture that could offer up some
I am open to any ideas on how to best work this.

Overview of a Request (as an example):
Browser GET /cart/5 -> Rails app/controllers/cart:get -> Java service to
contents of cart (java models) along with any other info needed for page
Rails controller with Java objects -> Rails view using Java objects

Take a look at It
attaches ActiveModel to several Hibernate models.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs