Created
November 4, 2008 21:07
-
-
Save topfunky/22215 to your computer and use it in GitHub Desktop.
This file contains 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
# OUTPUT | |
# Called with: foo : html : flatapp_rc5 | |
# Called with: flatapp_rc5 : html : flatapp_rc5 | |
# Called with: application : html : flatapp_rc5 | |
class FlatappRc5 < Merb::Controller | |
def _template_location(action, type = nil, controller = controller_name) | |
puts "Called with: " + [action, type, controller_name].join(" : ") | |
# This works better for taking advantage of views/application.html.erb | |
controller == "application" ? "application.#{type}" : "#{action}.#{type}" | |
end | |
def index | |
"Hello, I am flat Merb application. I only have one single file for the application, single file for configs and routes, and a directory for views." | |
end | |
def foo | |
render | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment