Revision b6e0cb16
Added by Ohad Levy over 13 years ago
app/controllers/environments_controller.rb | ||
---|---|---|
class EnvironmentsController < ApplicationController
|
||
include Foreman::Controller::Environments
|
||
|
||
before_filter :find_environment, :only => %w{show edit update destroy}
|
||
before_filter :find_by_name, :only => %w{show edit update destroy}
|
||
|
||
def index
|
||
respond_to do |format|
|
||
... | ... | |
redirect_to environments_url
|
||
end
|
||
|
||
private
|
||
def find_environment
|
||
@environment = Environment.find_by_name(params[:id])
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #454 - Foreman render 500 instead of 404