Skip to content
Snippets Groups Projects
Unverified Commit 5fd69af6 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix locales breaking in development (#4521)

parent f913a198
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,9 @@ module Api ...@@ -31,6 +31,9 @@ module Api
def show def show
language = params[:name].tr('-', '_') language = params[:name].tr('-', '_')
# Serve locales files directly in development (not through asset pipeline)
return render file: Rails.root.join('app', 'assets', 'locales', "#{language}.json") if Rails.env.development?
redirect_to ActionController::Base.helpers.asset_path("#{language}.json") redirect_to ActionController::Base.helpers.asset_path("#{language}.json")
rescue StandardError rescue StandardError
head :not_acceptable head :not_acceptable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment