Sha256: ac654c587018ef73957e458fb9e2f260a481e79be4d2565aa947edcc9a05f3b2
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# encoding: utf-8 # http://wiki.github.com/botanicus/rango/controllers require "rango/helpers" require "rango/stacks/controller" <% if RUBY_VERSION > "1.9.2" %> require "rango/mixins/action_args" <% end %> module <%= @name.camel_case %> class Application < Rango::StackController <% if RUBY_VERSION > "1.9.2" %> include Rango::ActionArgsMixin <% end %> # http://wiki.github.com/botanicus/rango/errors-handling def render_http_error(exception) if self.respond_to?(exception.to_snakecase) self.send(exception.to_snakecase, exception) else render_http_error_template(exception) end end def render_http_error_template(exception) render "errors/#{exception.status}.html" rescue TemplateNotFound render "errors/500.html" end end class ShowCase < Application def index render "index.html" end end <% @controllers.each do |controller| %> class <%= controller.camel_case %> < Application # TODO: implement <%= controller %> controller end <% end %> end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rango-0.2.3 | stubs/stack/content/lib/%name%/views.rb.rbt |
rango-0.2.1 | stubs/stack/content/lib/%name%/views.rb.rbt |
rango-0.2.1.pre | stubs/stack/content/lib/%name%/views.rb.rbt |