Skip to content

Instantly share code, notes, and snippets.

@girasquid
Created February 26, 2010 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save girasquid/315471 to your computer and use it in GitHub Desktop.
Save girasquid/315471 to your computer and use it in GitHub Desktop.
def set_chapter
@chapter = nil
if current_user
progress = current_user.progress.split(':')
if progress.first == params[:controller] and progress.second == params[:action]
@chapter = progress.third
end
end
@chapter
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment