mdeering / attribute_normalizer

Adds the ability to normalize attributes cleanly with code blocks and predefined normalizers
MIT License
475 stars 53 forks source link

undefined method `normalize_attribute' in Rails 4.2.1 #70

Closed acutemedical closed 9 years ago

acutemedical commented 9 years ago

I'm running Rails 4.2.1 and Ruby 2.2.2 for a new app. I've added the following to my Gemfile

gem 'attribute_normalizer', '~> 1.2.0'

I ran bundle install to install the gem, then called normalize_attribute in my Resource model like so.

normalize_attribute :name, :address, :notes, :phone_number, :with => :squish

And for good measure I reloaded Rails/restarted Thin.

When I visit a page that calls the Resource model, I get the following:

undefined method `normalize_attribute' for #<Class:0x007fed6d6a2248>

Am I doing something wrong or is there a bug/compatibility issue with Rails 4.2.1 and Ruby 2.2.2? I wanted to post this here before I went to Stack for answers.

acutemedical commented 9 years ago

Ok, I restarted my Rails app 3x and now I no longer see the nomethoderror. Will continue testing in development and if I have any problems I'll open a new issue. Sorry for the noise.