Skip to content

Instantly share code, notes, and snippets.

@osiro
Created November 7, 2013 03:21
Show Gist options
  • Save osiro/7348434 to your computer and use it in GitHub Desktop.
Save osiro/7348434 to your computer and use it in GitHub Desktop.
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