Class: ProfilesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
# File 'app/controllers/profiles_controller.rb', line 6

def show
  subject_profile

  respond_to do |format|
    format.html
    format.js
    format.json { render json: subject_profile.to_json }
  end
end

#updateObject



16
17
18
19
20
21
22
23
# File 'app/controllers/profiles_controller.rb', line 16

def update
  current_profile.update_attributes profile_params

  respond_to do |format|
    format.html{ redirect_to [profile_subject, :profile] }
    format.js
  end
end