GKK GKK - 4 months ago 36x
Ruby Question

Ruby on Rails: How to check if the Model Exists

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?


defined? ModelName will return "constant" if model defined.