Skip to content

Instantly share code, notes, and snippets.

@sarahduve
Last active April 23, 2019 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarahduve/026284c1f40bc7eafc5b53e673ca9c06 to your computer and use it in GitHub Desktop.
Save sarahduve/026284c1f40bc7eafc5b53e673ca9c06 to your computer and use it in GitHub Desktop.
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