mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
fixed User.to_json
This commit is contained in:
parent
4db9ffb7b8
commit
9af1e5c658
@ -11,7 +11,7 @@
|
||||
- Fix a security issue: nokogiri < 1.8.2 has a security vulnerability as described in [CVE-2017-18258](https://nvd.nist.gov/vuln/detail/CVE-2017-18258)
|
||||
- Fix a security issue: sprockets < 2.12.5 has a security vulnerability as described in [CVE-2018-3760](https://nvd.nist.gov/vuln/detail/CVE-2018-3760)
|
||||
- Ensure elasticSearch indices are started with green status on new installations
|
||||
- Refactored User.as_json to remove code duplication
|
||||
- Refactored User.to_json to remove code duplication
|
||||
- Fixed syntax and typos in README
|
||||
- [TODO DEPLOY] **IMPORTANT** Please read [elastic_upgrade.md](doc/elastic_upgrade.md) for instructions on upgrading ElasticSearch.
|
||||
- [TODO DEPLOY] `rake fablab:fix:categories_slugs`
|
||||
|
@ -74,7 +74,7 @@ class User < ActiveRecord::Base
|
||||
scope :without_subscription, -> { includes(:subscriptions).where(subscriptions: { user_id: nil }) }
|
||||
scope :with_subscription, -> { joins(:subscriptions) }
|
||||
|
||||
def as_json
|
||||
def to_json(options)
|
||||
ApplicationController.new.view_context.render(
|
||||
partial: 'api/members/member',
|
||||
locals: { :member => self },
|
||||
|
@ -77,7 +77,7 @@
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body ng-controller="ApplicationController" ng-init="setCurrentUser(<%= current_user ? current_user.as_json : 'null' %>)" ng-cloak>
|
||||
<body ng-controller="ApplicationController" ng-init="setCurrentUser(<%= current_user ? current_user.to_json : 'null' %>)" ng-cloak>
|
||||
<div growl></div>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user