2012-12-02 06:29:24 -05:00
|
|
|
- if @user.valid?
|
|
|
|
:plain
|
2016-09-15 22:27:49 -04:00
|
|
|
new Flash("Username successfully changed", "notice")
|
2012-12-02 06:29:24 -05:00
|
|
|
- else
|
2016-11-23 18:31:35 -05:00
|
|
|
- error = @user.errors.full_messages.first
|
2012-12-02 06:29:24 -05:00
|
|
|
:plain
|
2016-11-23 18:31:35 -05:00
|
|
|
new Flash("Username change failed - #{escape_javascript error.html_safe}", "alert")
|