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.
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#edit ⇒ Object
9 10 |
# File 'app/controllers/users_controller.rb', line 9 def edit end |
#find ⇒ Object
find users by email for autocomplete
25 26 27 28 29 |
# File 'app/controllers/users_controller.rb', line 25 def find users = User.where("email ILIKE ?", "#{params[:term]}%").order(:email).pluck(:email) render :json => users end |
#show ⇒ Object
6 7 |
# File 'app/controllers/users_controller.rb', line 6 def show end |
#update ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/users_controller.rb', line 12 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 |