Ruby on Rails: How to check if the Model Exists

Viewed 8217

I want to know how to check if the model already exists in the project or not?

When user tries to create a model programatically using the same model name, need to check if it already exists or not?

3 Answers

Another option is use exists

Return false if there is no column in the model.

Related