Class: UserTemplates::AccountController

Inherits:
Volt::ModelController
  • Object
show all
Defined in:
app/user_templates/controllers/account_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/user_templates/controllers/account_controller.rb', line 5

def index
  self.model = Volt.current_user.then(&:buffer)
end

#saveObject



9
10
11
12
13
14
# File 'app/user_templates/controllers/account_controller.rb', line 9

def save
  model.save! do
    flash._notices << 'Account settings saved'
    redirect_to '/'
  end
end