Class: Iro::ProfilesController
- Inherits:
-
ApplicationController
- Object
- Wco::ApplicationController
- ApplicationController
- Iro::ProfilesController
- Defined in:
- app/controllers/iro/profiles_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /profiles.
-
#destroy ⇒ Object
DELETE /profiles/1.
-
#edit ⇒ Object
GET /profiles/1/edit.
-
#index ⇒ Object
GET /profiles.
-
#new ⇒ Object
GET /profiles/new.
-
#show ⇒ Object
GET /profiles/1.
-
#update ⇒ Object
PATCH/PUT /profiles/1.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /profiles
24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/iro/profiles_controller.rb', line 24 def create @profile = Profile.new(profile_params) if @profile.save redirect_to @profile, notice: 'Profile was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /profiles/1
44 45 46 47 |
# File 'app/controllers/iro/profiles_controller.rb', line 44 def destroy @profile.destroy redirect_to profiles_url, notice: 'Profile was successfully destroyed.' end |
#edit ⇒ Object
GET /profiles/1/edit
20 21 |
# File 'app/controllers/iro/profiles_controller.rb', line 20 def edit end |
#index ⇒ Object
GET /profiles
6 7 8 |
# File 'app/controllers/iro/profiles_controller.rb', line 6 def index @profiles = Profile.all end |
#new ⇒ Object
GET /profiles/new
15 16 17 |
# File 'app/controllers/iro/profiles_controller.rb', line 15 def new @profile = Profile.new end |
#show ⇒ Object
GET /profiles/1
11 12 |
# File 'app/controllers/iro/profiles_controller.rb', line 11 def show end |
#update ⇒ Object
PATCH/PUT /profiles/1
35 36 37 38 39 40 41 |
# File 'app/controllers/iro/profiles_controller.rb', line 35 def update if @profile.update(profile_params) redirect_to @profile, notice: 'Profile was successfully updated.' else render :edit end end |