render は部分テンプレートを呼び出すことができます。 次のコードは、同フォルダ内にある _hoge.html.erb を呼び出します。 <%= render "hoge" %> ウェブサイト上では、hogeページが埋めこまれている様に表示されます。 で、誤解をしていたのですが、render はメソッドや関数みたいなモノらしいです。 main.html.erb <% @Mains.each do | main| %> <%= render "hoge" %> <% end %> _hoge.html.erb <%= main %> とやっても _hoge.html.erb は 「main なんてローカル変数知らない」というわけです。 表示は埋め込みされいるように見えるため、C言語の #define みたいなものかと勘違いしてました。 では、どうやって _hoge.html.erb で