Skip to content

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