MrDys / blacklight

Blacklight Plugin
http://projectblacklight.org/
Other
1 stars 1 forks source link

Blacklight devise install process broken with existing User model #520

Closed MrDys closed 12 years ago

MrDys commented 12 years ago

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

MrDys commented 12 years ago

Original reporter: cbeer

MrDys commented 12 years ago

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.