Closed MrDys closed 12 years ago
Original reporter: cbeer
cbeer: Maybe the devise generator should refuse to run if it is trying to re-create an existing class? At the very least, the insert_into_file (https://github.com/projectblacklight/blacklight/blob/master/lib/generators/blacklight/blacklight_generator.rb#L66) should probably check for an exsting #to_s, and try to inject itself a little safer.
CODEBASE-337: "My existing User model was not extended properly. The "to_s" method was added inside of every method definition in the class as well as at the class itself."
https://github.com/projectblacklight/blacklight/blob/master/lib/generators/blacklight/blacklight_generator.rb#L57