Created
November 7, 2013 03:21
-
-
Save osiro/7348434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Registered::Staff::Profile::SkillsController < Registered::Staff::ProfileController | |
def new | |
@available_positions = Position.order_by_name | |
@form = StaffProfileSkillsForm.from_user(current_user) | |
end | |
def create | |
@available_positions = Position.order_by_name | |
@form = StaffProfileSkillsForm.new(params[:user]) | |
current_user.update_attributes(@form.clean) | |
requirement_manager = RequirementManager.new(current_user) | |
positions = current_user.position_users.where(qualified: false).map(&:position) | |
requirement_manager.update_user_qualified(positions, current_user) | |
redirect_on_completed | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment