Class: Protected::Api::OdaniaProfile::ProfilesController
- Inherits:
-
Protected::ApiController
- Object
- Protected::ApiController
- Protected::Api::OdaniaProfile::ProfilesController
- Defined in:
- app/controllers/protected/api/odania_profile/profiles_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 |
# File 'app/controllers/protected/api/odania_profile/profiles_controller.rb', line 4 def index @timelines = OdaniaTimeline::Timeline.where(user_id: current_user.id, language_id: @profile.language_id) end |
#update ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/protected/api/odania_profile/profiles_controller.rb', line 8 def update if @profile.update(profile_attributes) update_skills render action: :index else render json: {errors: @profile.errors}, status: :bad_request end end |