-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
I've noticed some ugly spacing with arrays, hashes and sets, like the following:
def technology_process_params
params.require(:technology_process).permit(
:type,
:technology_id,
:cohort_id,
:user_id,
:parent_id,
:name,
:description,
citations_attributes: [:url]
)
endI suggest we have the opening and closing character at the same level indentation, and all items in the set be indented only once, for example:
def technology_process_params
params.require(:technology_process).permit(
:type,
:technology_id,
:cohort_id,
:user_id,
:parent_id,
:name,
:description,
citations_attributes: [:url]
)
endThis should go for any array or hash that you are creating that is too long, some more examples:
# Hash examles
hash = {
key_1: value,
key_2: value2,
...
}
# Array example
array = [
"Something",
"Another super cool thing",
"And one more for the win"
]Thoughts on this? Agree/disagree?
Reactions are currently unavailable