Added root elements and dict support for preferences response

This commit is contained in:
Michal Migurski 2021-04-07 17:41:44 -07:00
parent fd7526857b
commit 143a90fcac
2 changed files with 3 additions and 6 deletions

View file

@ -1,5 +0,0 @@
attrs = {
user_preference.k => user_preference.v
}
json.preference(attrs)

View file

@ -1 +1,3 @@
json.partial! @user_preferences
json.partial! "api/root_attributes"
json.preferences @user_preferences.map { |pref| [pref.k, pref.v] }.to_h