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
INS*Y*18*030**A~ | |
REF*0F*435343456~ | |
REF*1L*1234567890~ | |
DTP*336*D8*20110401~ | |
NM1*IL*1*Williams*Dylan****34*435343456~ | |
N3*629 N High St*Floor 6~ | |
N4*Columbus*OH*43215*USA~ | |
DMG*D8*19750303*M~ | |
HD*030**DEN**EMP~ | |
DTP*348*D8*20160401~ |
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
{ | |
"subgroup_number": "1234567890", | |
"effective_at": "2016-04-01", | |
"coverage_type": "employee", | |
"members": [ | |
{ | |
"first_name": "Dylan", | |
"last_name": "Williams", | |
"role": "primary", | |
"member_id": "435343456", |
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 random_mac_address | |
hex_list = '0123456789ABCDEF'.split(//) | |
mac = "" | |
for i in 0..16 | |
if i % 3 == 2 | |
mac += ':' | |
else | |
mac += hex_list.sample | |
end | |
end |
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
class ApplicationController < ActionController::Base | |
# ... | |
unless Rails.application.config.consider_all_requests_local | |
rescue_from Exception, with: lambda { |exception| render_error 500, exception } | |
rescue_from ActionController::RoutingError, ActionController::UnknownController, ::AbstractController::ActionNotFound, ActiveRecord::RecordNotFound, with: lambda { |exception| render_error 404, exception } | |
end | |
private | |
def render_error(status, exception) |