Class: Pasaporte::Controllers::EditProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/pasaporte.rb

Overview

Allows the user to modify the settings

Instance Method Summary collapse

Instance Method Details

#get_with_nickObject



595
596
597
598
599
# File 'lib/pasaporte.rb', line 595

def get_with_nick
  require_login!
  require_ssl!
  render :profile_form
end

#post_with_nickObject



601
602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/pasaporte.rb', line 601

def post_with_nick
  require_login!
  require_ssl!
  validate_token!
  
  _collapse_checkbox_input(input)
  
  if @profile.update_attributes(input.profile)
    show_message "Your settings have been changed"
    redirect R(DashPage, @nickname); return
  end
  show_error "Cannot save your profile: <b>%s</b>" % @profile.errors.full_messages
  render :profile_form
end