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

decorates does weird things b/c of #classify #386

Closed
alindeman opened this issue Dec 13, 2012 · 4 comments
Closed

decorates does weird things b/c of #classify #386

alindeman opened this issue Dec 13, 2012 · 4 comments

Comments

@alindeman
Copy link
Contributor

Draper 1.0.0.beta3

class MyAwesomeDecorator < Draper::Decorator
  decorates :address
end

Error raised:

uninitialized constant Addres

I think it's because of this:

$ irb -ractive_support/all
1.9.3p327 :001 > "address".classify
 => "Addres"
@pixeltrix
Copy link

@steveklabnik you want to use camelize:

>> "address".camelize
=> "Address"

The classify method is essentially string.singularize.camelize.

@steveklabnik
Copy link
Member

Ahhh, thank you! ❤️.

@alindeman
Copy link
Contributor Author

Awesome response time 💃

@steveklabnik
Copy link
Member

I try. ❤️

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

No branches or pull requests

3 participants