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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -