Files

Class/Module Index [+]

Quicksearch

Devise::Controllers::ScopedViews

Protected Instance Methods

render_with_scope(action, path=self.controller_path) click to toggle source

Render a view for the specified scope. Turned off by default. Accepts just :controller as option.

# File lib/devise/controllers/scoped_views.rb, line 20
def render_with_scope(action, path=self.controller_path)
  if self.class.scoped_views?
    begin
      render :template => "#{devise_mapping.scoped_path}/#{path.split("/").last}/#{action}"
    rescue ActionView::MissingTemplate
      render :template => "#{path}/#{action}"
    end
  else
    render :template => "#{path}/#{action}"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.