Class: Polivalente::UsersController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Polivalente::UsersController
- Defined in:
- app/controllers/polivalente/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
19 20 |
# File 'app/controllers/polivalente/users_controller.rb', line 19 def edit end |
#index ⇒ Object
5 6 |
# File 'app/controllers/polivalente/users_controller.rb', line 5 def index end |
#show ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/polivalente/users_controller.rb', line 8 def show @recent_activities = [] # Sudo-random list of user suggestions @related_users = @user_class.all .where(id: 10.times.map { rand(@user_class.first.id...@user_class.last.id) }) .where.not(id: @user.id) .latest .first(4) end |
#update ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/polivalente/users_controller.rb', line 22 def update if @user.update(user_params) render :show else render :edit end end |