Class: ThinkFeelDoDashboard::SocialNetworking::ProfileQuestionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ThinkFeelDoDashboard::SocialNetworking::ProfileQuestionsController
- Defined in:
- app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb
Overview
Allows for the creation, updating, and deletion of social networking profile questions
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 16 def create @profile_question = @group.profile_questions .build(profile_question_params) if @profile_question.save redirect_to (@group), notice: "Profile Question was successfully created." else render :new end end |
#destroy ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 43 def destroy if @profile_question.destroy redirect_to (@group), notice: "Profile Question was successfully removed." else redirect_to (@group), alert: "There were errors." end end |
#edit ⇒ Object
31 32 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 31 def edit end |
#index ⇒ Object
11 12 13 14 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 11 def index @profile_questions = ::SocialNetworking::ProfileQuestion .where(group_id: params[:group_id]) end |
#new ⇒ Object
27 28 29 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 27 def new @profile_question = ::SocialNetworking::ProfileQuestion.new end |
#update ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'app/controllers/think_feel_do_dashboard/social_networking/profile_questions_controller.rb', line 34 def update if @profile_question.update(profile_question_params) redirect_to (@group), notice: "Profile Question was successfully updated." else render :edit end end |