Module Lightrail::ControllerMethods::InstanceMethods
In: lib/lightrail/controller_methods.rb

Methods

Public Instance methods

Adding this to a controller in an around_filter allows the actions to render as such:

  • Look for the view in the controller‘s view path
  • If a view is not found, look for it in the superclass‘s view path

If an ActionController::UnknownAction is raised the controller will

  • Attempt to render the action using the base class‘s view path
  • Re-rase the original ActionController::UnknownAction if the view is not found

If an ActionController::MissingTemplate error is raised the controller will

  • Attempt to render the action using the base class‘s view path
  • Raise the original ActionController::MissingTemplate error

TODO: determine how much of a performance hit this takes, rendering everything twice

[Validate]