Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Class Resources, call #to_s for defined resource_name #238

Merged
merged 1 commit into from
Dec 23, 2015
Merged

Allow Class Resources, call #to_s for defined resource_name #238

merged 1 commit into from
Dec 23, 2015

Conversation

kevinjalbert
Copy link
Contributor

If using a class as the resource:

resource Order do
end

The resource_name will be a class, which causes issues when sorting for
sections. By calling #to_s on the args.first when first dealing with
the resource we can ensure that we are always working with a string for
the resource_name.


Also refactored to use a ternary operator instead of a one-line if else end.

If using a class as the resource:

  resource Order do
  end

The resource_name will be a class, which causes issues when sorting for
sections. By calling `#to_s` on the `args.first` when first dealing with
the resource we can ensure that we are always working with a string for
the resource_name.
@oestrich
Copy link
Contributor

Thanks!

oestrich added a commit that referenced this pull request Dec 23, 2015
Allow Class Resources, call `#to_s` for defined resource_name
@oestrich oestrich merged commit 212112e into zipmark:master Dec 23, 2015
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.

2 participants