Skip to content

Instantly share code, notes, and snippets.

@jm
Created November 4, 2009 22:58
Show Gist options
  • Save jm/226466 to your computer and use it in GitHub Desktop.
Save jm/226466 to your computer and use it in GitHub Desktop.
class ShapeController < AC::Base
SHAPES = { 'square' => Shape::Square, 'circle' => Shape::Circle }
def create
s = SHAPES[params[:shape]].create(params)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment