Auto-formatting empty methods?
已回答
I have empty methods in my Rails controllers:
def index; end
def new; end
def edit; end
I would like the auto-formatter to format/preserve empty methods on a single line as shown above. But right now, it breaks the definition into multiple lines:
def index;
end
def new;
end
def edit;
end
How can tell RubyMine to do this?
Thanks.
请先登录再写评论。
I was looking for the same feature. Auto-formatting should support the rules that follow the "standard" format that RubyMine/Ruby Plugin suggest to use at default.
> One exception to the rule are empty-body methods.
https://github.com/rubocop-hq/ruby-style-guide
Hello,
we have a corresponding request on our tracker so please add your vote:
https://youtrack.jetbrains.com/issue/RUBY-20204