File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,13 @@ def initialized?
135
135
@initialized
136
136
end
137
137
138
+ # Returns the dhasherized application name.
139
+ #
140
+ # MyApp::Application.new.name => "my-app"
141
+ def name
142
+ self . class . name . underscore . dasherize . delete_suffix ( "/application" )
143
+ end
144
+
138
145
def run_load_hooks! # :nodoc:
139
146
return self if @ran_load_hooks
140
147
@ran_load_hooks = true
Original file line number Diff line number Diff line change @@ -89,9 +89,8 @@ def start
89
89
end
90
90
91
91
env = colorized_env
92
- app_name = @app . class . module_parent_name . underscore . dasherize
93
92
prompt_prefix = "%N(#{ env } )"
94
- IRB . conf [ :IRB_NAME ] = app_name
93
+ IRB . conf [ :IRB_NAME ] = @app . name
95
94
96
95
IRB . conf [ :PROMPT ] [ :RAILS_PROMPT ] = {
97
96
PROMPT_I : "#{ prompt_prefix } > " ,
You can’t perform that action at this time.
0 commit comments