-
-
Save NotGrm/c8c8918ebe6b08f3e441ecae501fc97f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We can get application class by | |
>> Rails.application.class.name | |
# => "Meetup::Application" | |
## Since we are only interested in application name, we can get it by | |
>> Rails.application.class.module_parent.name | |
# => "Meetup" | |
# Caveat: In previous versions of ruby, rails it can be acheived by | |
>> Rails.application.class.parent.name | |
# => "Meetup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment