Locale for "Create views from actions" in Rails project

Answered

I fine the "Create views from actions" feature very handy. (https://www.jetbrains.com/help/ruby/creating-rails-application-elements.html#view)

But recently RubyMine has decided that I'm using a German locale as default. As a result, every view file it tries to generate using this feature will include the 'de' code, eg. "index.de.html.erb", when I'd prefer it to just suggest "index.html.erb".

For what it's worth, my Rails application does in fact have two locales language files in config/locales, (en.yml & de.yml) but until very recently, it would not default to including a locales code in the suggested filename.

I just don't know where RubyMine is getting this configuration from.

Thanks in advance for any advice.

2 comments
Comment actions Permalink

Hello Andy,

have you changed the extension before? Because in general we default to .html.erb, but if you change the extension we save that and use it the next time. Please try editing the extension back to .html.erb and check whether it still offers .de.html.erb.

1
Comment actions Permalink

Thanks. Actually that's precisely what happened!

I don't know if this is a relatively recent addition because it's not something I've noticed before. Either way, I can see how this behaviour is useful.

0

Please sign in to leave a comment.