Correct bug in creating portions of the app_data

This commit is contained in:
Eric 2020-05-29 15:33:29 -05:00
parent e5fa2d0b55
commit 760dc7e99b
2 changed files with 3 additions and 3 deletions

View file

@ -5,4 +5,4 @@ json.extract! user, :id, :created_at, :updated_at, :email
json.unconfirmed_email user.unconfirmed_email
json.confirmed user.confirmed?
json.partial! 'app_data/profile.json', profile: user.profile
json.partial! 'app_data/profile', profile: user.profile

View file

@ -7,9 +7,9 @@ var app = {
, current_admin: <%= !!(current_user && current_role?(:super_admin)) %>
, nonprofit: <%= @nonprofit ? raw(render('app_data/nonprofit', nonprofit: @nonprofit)) : 'undefined' %>
, nonprofit_id : <%= @nonprofit ? @nonprofit.id : 'undefined' %>
, user: <%= current_user ? raw(render('app_data/user.json', user: current_user)) : 'undefined' %>
, user: <%= current_user ? raw(render('app_data/user', user: current_user)) : 'undefined' %>
, user_id: <%= current_user ? current_user.id : 'undefined' %>
, profile: <%= current_user&.profile ? raw(render('app_data/profile.json', profile: current_user.profile)) : 'undefined' %>
, profile: <%= current_user&.profile ? raw(render('app_data/profile', profile: current_user.profile)) : 'undefined' %>
, profile_id: <%= current_user&.profile ? current_user.profile.id : 'undefined' %>
, asset_path: "<%= Rails.application.config.assets.prefix %>"
, host_with_port: "//<%= request.host_with_port %>"