Class: UsersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- UsersController
- Defined in:
- app/controllers/users_controller.rb
Instance Method Summary collapse
- #edit ⇒ Object
-
#find ⇒ Object
find users by email for autocomplete.
- #update ⇒ Object
Instance Method Details
#edit ⇒ Object
6 7 |
# File 'app/controllers/users_controller.rb', line 6 def edit end |
#find ⇒ Object
find users by email for autocomplete
22 23 24 25 26 |
# File 'app/controllers/users_controller.rb', line 22 def find users = User.where("email ILIKE ?", "#{params[:term]}%").order(:email).pluck(:email) render :json => users end |
#update ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/users_controller.rb', line 9 def update unless params[:user][:app_infos].blank? @user.merge_app_infos(params[:user][:app_infos]) params[:user].delete(:app_infos) end if @user.update_attributes(params[:user]) redirect_to groups_users_url, :notice => 'Benutzer wurde erfolgreich gespeichert.' else render :action => "edit" end end |