Created
November 18, 2014 07:37
-
-
Save craigmarksmith/69d1f10dec41f8f46bf6 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
hours = params[:standard_trading_hour].map do |key, hour| | |
hour | |
end | |
special_hours = params[:special_trading_hour].map do |key, hour| | |
hour.merge(centre_id:current_centre.code) | |
end | |
CentreTradingHour.post('/api/trading-hour/master/centre_trading_hours.json', {hours: hours+special_hours}) | |
redirect_to(edit_centre_centre_trading_hours_path(centre_id: current_centre.code), notice: "Centre trading hours were successfully created.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment