Actually even in maps4rails 1.x, you're not compelled to put htm in model.
Documentation is here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Controller
Do it this way:
@json = User.all.to_gmaps4rails do |user, marker|
marker.infowindow render_to_string(:partial => "/users/my_template", :locals => { :object => user})
end
So you can use partials and pass them variables