Last active
May 2, 2024 09:06
-
-
Save the-spectator/ba03810f168774573dd0e29eb9384d58 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