Skip to content

Commit

Permalink
Update base_helper.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
cianmce authored Nov 26, 2023
1 parent c1ef5b3 commit a461178
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions app/helpers/blazer/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,15 @@ def blazer_series_name(k)
private

def format_json_value(value)
begin
JSON.pretty_generate(JSON.parse(value))
rescue JSON::ParserError
value
end
JSON.pretty_generate(JSON.parse(value))
rescue JSON::ParserError
value
end

def format_yaml_value(value)
begin
YAML.dump(YAML.load(value))
rescue Exception
value
end
rescue StandardError
value
end
end
end

0 comments on commit a461178

Please sign in to comment.