Skip to content

Conversation

@snapai
Copy link

@snapai snapai commented Jul 26, 2013

The previous "setting ||= find_by_name(name)" line failed to load settings (only overwrote the setting if it did not contain a default - a condition guaranteed by the previous conditional to never occur)

"||=" is "set value if not already set" not "set value if right side isn't nil". There's probably a more graceful way to do this that doesn't involve pulling the setting -twice-, but I'm brand new to Ruby and have no idea how to do that. :)

The previous "setting ||= find_by_name(name)" line failed to load settings (only overwrote the setting if it did not contain a default - a condition guaranteed by the previous conditional to never occur)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant