Search code examples
ruby-on-railsruby-on-rails-3activerecordruby-on-rails-3.1

ActiveModel::MissingAttributeError when trying to print a float field


I just added a float field to my table and for some reason I keep getting this error when trying to show it on the view

ActiveModel::MissingAttributeError

Does anyone know why? My view simply looks like

%td= item.tax_rate


Solution

  • I know why this is happening now. I am doing a select on the query and I did not select the field that I need.