]> git.openstreetmap.org Git - rails.git/blob - app/controllers/profiles/profile_sections_controller.rb
Fix eslint warning
[rails.git] / app / controllers / profiles / profile_sections_controller.rb
1 module Profiles
2   class ProfileSectionsController < ApplicationController
3     layout "site"
4
5     before_action :authorize_web
6     before_action :set_locale
7
8     authorize_resource :class => :profile
9
10     before_action :check_database_readable
11     before_action :check_database_writable, :only => [:update]
12
13     def show; end
14
15     def update
16       if update_profile
17         flash[:notice] = t ".success"
18         redirect_to user_path(current_user)
19       else
20         flash.now[:error] = t ".failure"
21         render :show
22       end
23     end
24   end
25 end