Conversation

kevinjalbert

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

Thanks!

oestrich added a commit that referenced this pull request Dec 23, 2015
Allow Class Resources, call `#to_s` for defined resource_name
@oestrichoestrich merged commit 212112e into zipmark:master Dec 23, 2015
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.