ruby on rails - Render remote view in local layout -


my organization considering re-implementing existing rails monolith collection of rails services. content layer, our thought our api gateway contain layout information whole app, , request individual views via http. individual services render templates , send them via http rendered html.

my question this: there mechanism in rails request remote content via http, render received html erb/haml layout template, , serve rendered html?

like requesting information in controller , outputting string in erb template?

is there other requirement i'm missing?

controller

def index   @content = body_of_request_to_service end 

view

... <%= @content %> ... 

but, wouldn't recommend style of microservices using ruby (unless have dev-team understands how handle async ruby io). rule of thumb have 1 blocking service request per client request.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -