I have a variable that stores the name of a class
my_class = "Homework"
You can use
my_class.classify.constantize.find_by # something
Create a class name from a plural table name like Rails does for table names to models. Note that this returns a string and not a Class (To convert to an actual class follow classify with constantize).
Tries to find a constant with the name specified in the argument string.
'Module'.constantize # => Module 'Test::Unit'.constantize # => Test::Unit
If you are sure about your input, you need only
my_class.constantize.find_by # something