Revision 9d5ef1c9
Added by Ondřej Pražák over 4 years ago
app/controllers/api/v2/containers_controller.rb | ||
---|---|---|
2 | 2 |
module Api |
3 | 3 |
module V2 |
4 | 4 |
class ContainersController < ::Api::V2::BaseController |
5 |
before_filter :find_resource, :except => %w(index create)
|
|
5 |
before_action :find_resource, :except => %w(index create)
|
|
6 | 6 |
|
7 | 7 |
resource_description do |
8 | 8 |
resource_id 'containers' |
app/controllers/api/v2/registries_controller.rb | ||
---|---|---|
2 | 2 |
module V2 |
3 | 3 |
class RegistriesController < ::Api::V2::BaseController |
4 | 4 |
include Foreman::Controller::Parameters::DockerRegistry |
5 |
before_filter :find_resource, :except => %w(index create)
|
|
5 |
before_action :find_resource, :except => %w(index create)
|
|
6 | 6 |
|
7 | 7 |
resource_description do |
8 | 8 |
resource_id 'registries' |
app/controllers/containers/steps_controller.rb | ||
---|---|---|
5 | 5 |
|
6 | 6 |
steps :preliminary, :image, :configuration, :environment |
7 | 7 |
|
8 |
before_filter :find_state
|
|
9 |
before_filter :build_state, :only => [:update]
|
|
10 |
before_filter :set_form, :only => [:show]
|
|
8 |
before_action :find_state
|
|
9 |
before_action :build_state, :only => [:update]
|
|
10 |
before_action :set_form, :only => [:show]
|
|
11 | 11 |
|
12 | 12 |
def show |
13 | 13 |
@container_resources = allowed_resources if step == :preliminary |
app/controllers/containers_controller.rb | ||
---|---|---|
1 | 1 |
class ContainersController < ::ApplicationController |
2 | 2 |
include ForemanDocker::FindContainer |
3 | 3 |
|
4 |
before_filter :find_container, :only => [:show, :commit, :power]
|
|
4 |
before_action :find_container, :only => [:show, :commit, :power]
|
|
5 | 5 |
|
6 | 6 |
def index |
7 | 7 |
@container_resources = allowed_resources |
app/controllers/registries_controller.rb | ||
---|---|---|
1 | 1 |
class RegistriesController < ::ApplicationController |
2 | 2 |
include Foreman::Controller::AutoCompleteSearch |
3 | 3 |
include Foreman::Controller::Parameters::DockerRegistry |
4 |
before_filter :find_registry, :only => [:edit, :update, :destroy]
|
|
4 |
before_action :find_registry, :only => [:edit, :update, :destroy]
|
|
5 | 5 |
|
6 | 6 |
def index |
7 | 7 |
@registries = DockerRegistry.search_for(params[:search], :order => params[:order]) |
Also available in: Unified diff
Fixes #21732 - Replace :before_filter with :before_action