Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move '.decorate' from view to controller in api/proxy_configs/index #2111

Merged
merged 5 commits into from Aug 11, 2020

Conversation

Martouta
Copy link
Contributor

@Martouta Martouta commented Aug 6, 2020

@Martouta Martouta added the do not review This PR is currently not reviewable label Aug 6, 2020
@Martouta Martouta self-assigned this Aug 6, 2020
@Martouta Martouta force-pushed the rm-app/views/api/proxy_configs/index branch from 88f443b to 312d7e1 Compare August 10, 2020 17:03
@Martouta Martouta changed the title [WIP] [DO NOT REVIEW] Remove '.decorate' from view in api/proxy_configs/index Move '.decorate' from view to controller in api/proxy_configs/index Aug 11, 2020
@Martouta Martouta marked this pull request as ready for review August 11, 2020 00:33
@Martouta Martouta added cleanup Cleanup task Priority: Low Optional enhancements, issues out of the sprint, etc. ruby Pull requests that update Ruby code tech-debt and removed do not review This PR is currently not reviewable labels Aug 11, 2020
class Api::ProxyConfigsController < Api::BaseController
load_and_authorize_resource :service, through: :current_user, through_association: :accessible_services

activate_menu :serviceadmin, :integration, :configuration
sublayout 'api/service'

def index
if params[:environment].to_s.downcase == 'production'.freeze
@proxy_configs = proxy_configs.production.paginate(paginate_params)
@environment_name = 'Production'.freeze
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@environment_name = 'Production'.freeze
else
@proxy_configs = proxy_configs.sandbox.paginate(paginate_params)
@environment_name = 'Staging'.freeze
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Martouta Martouta requested review from a team and josemigallas August 11, 2020 00:35
@Martouta Martouta merged commit f46f350 into master Aug 11, 2020
@Martouta Martouta deleted the rm-app/views/api/proxy_configs/index branch August 11, 2020 06:23
hallelujah pushed a commit that referenced this pull request Sep 10, 2020
…ndex

Move '.decorate' from view to controller in api/proxy_configs/index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Cleanup task Priority: Low Optional enhancements, issues out of the sprint, etc. ruby Pull requests that update Ruby code tech-debt
Projects
None yet
2 participants