Ruby indentation in GitHub editor

Hey guys, I want some help

I am not sure whether I am in the right place to ask this question. Anyway, this is the question

I am having a problem with the ruby indentation in the GitHub editor. My code in GitHub looks like this.

2021-03-05-11-06-github.com

How can I make it look like this

2021-03-05-11-08-github.com

Please inform me if I have to edit the question or add more details

Thank you

you have too many spaces at the beginning of each line, you just need to delete them

there are auto-formatters you could try to use, instead of doing it manually

@pranavbaburaj, I believe the issue you’re seeing is similar to what’s asked in this SO post. Doesn’t matter the IDE used or the language.

I noticed the same thing and for the most part it’s been corrected after reading

Thank you @ieahleen for your answer, But actually, the function is an Instance method of a class, that is why it is indented at the beginning.

:slightly_smiling_face:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.