Created
July 21, 2009 22:42
-
-
Save roman/151685 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= embed_action :controller => 'roman_embedded', | |
| :action => 'index' %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class RomanEmbeddedController < ApplicationController | |
| def index | |
| render :text => 'HELLO WORLD' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class RomanTestsController < ApplicationController | |
| def index | |
| render :action => 'index', :layout => false | |
| end | |
| def another | |
| embed_action :controller => 'roman_embedded', | |
| :action => 'index' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ActionController::Routing::Routes.draw do |map| | |
| map.connect "/roman_tests/index", :controller => 'roman_tests', :action => 'index' | |
| map.connect "/roman_tests/other", :controller => 'roman_tests', :action => 'another' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment