This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/39 render_componentの挙動を調査する必要があったので、メモを残しておきます。 render_componentは、いわゆるWidgetのような、再利用可能なGUI部品をレンダリングするメソッドです。以下に、要点だけ抜き出したソースを示します。 長いので先に結論だけ書いておくと、render_componentでレンダリングされるコンポーネントのコードから、呼び出し元の外部コントローラにアクセスするには、ActionController#parent_controllerを介せばOKです。 $ vim vendor/rails/actionpack/lib/action_controller/components.rb