Last active
April 23, 2019 18:29
-
-
Save sarahduve/026284c1f40bc7eafc5b53e673ca9c06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
authorize! :show, @shipment | |
choose_view_based_on_feature_flag | |
@redirect_path = shipment_path(@shipment) | |
@shipment_presenter = ShipmentShowPresenter.new(@shipment) | |
respond_to do |format| | |
format.html | |
end | |
end | |
private | |
def choose_view_based_on_feature_flag | |
@old_styles = FeatureGuard.shipment_show_v2? ? false : true | |
@partial = FeatureGuard.shipment_show_v2? ? "shipments/v2/shipment" : "shipments/shipment" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment