Sha256: e0a371e2a1419eba2cccef5f7f9fcbb696db6e543649511fc0d139f4abd5170b
Contents?: true
Size: 706 Bytes
Versions: 2
Compression:
Stored size: 706 Bytes
Contents
class Admin::SettingsController < Admin::ApplicationController before_filter :require_user skip_before_filter :require_admin_user before_filter do |c| if current_user && current_user.has_admin_rights? add_breadcrumb "Settings", :admin_settings_path end end def edit end def update if @current_user.update_attributes(user_params) flash[:notice] = "User settings saved successfully." respond_with @current_user, :location => admin_settings_path else render 'edit' end end private def user_params params.require(:spud_user).permit(:login, :first_name, :last_name, :email, :password, :password_confirmation, :time_zone) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tb_core-1.2.1 | app/controllers/admin/settings_controller.rb |
tb_core-1.2.0 | app/controllers/admin/settings_controller.rb |