ruby on rails 4 - Render view inside a view -
ruby on rails 4 - Render view inside a view -
i have website requires this:
index.html.erb:
<div> <%= render "hello" %> </div>
hello.html.erb:
whatever content other here
that doesn't work since hello not partial. there way create render work anyways? (maybe not using render ^^)
and no, changing hello.html.erb partial not option, "hello" separate page can displayed on it's own.
i utilize iframe... i'd rather stick rendering page server-side :)
i think can utilize render template
:
render template: 'hello' # should render hello.html.erb
or
render template: 'products/show' # render views/products/show.html.erb
ruby-on-rails-4
Comments
Post a Comment