次のものを手に入れたい...
# For ArticlesController > ApplicationController
# in view
render 'articles/edit/form'
# tries 'app/views/articles/edit/_form.html.erb'
# then tries 'app/views/articles/_form.html.erb'
# then what it wants
partial
または、配列オプションを使用してレンダリングすることもできます。
# For ArticlesController > ApplicationController
# in view
render_exists ['articles/edit/form', 'articles/new/form']
# tries 'app/views/articles/edit/_form.html.erb'
# then tries 'app/views/articles/new/_form.html.erb'
# then what it wants
これは実現していませんね。しかし、3.2やmonkeypatches用のいくつかの宝石...そしてそれrails
についてのプルリクエストを知らないのですか?ありがとう!
UPDこれはコントローラーベースのビュー継承ではありません。これは(同じページで)機能するはずです:
render `articles/edit/form`
render `comments/edit/form`