I upgraded to rails 2.0.2 so i get this error ActiveRecord::DangerousAttributeError in Asset#show
this is in the view <div class="price"><%=h shekels_to_dollars(@asset.price_shekel, options = {:precision => 0}) %></div>
when i delete this line every thing is ok
This is in application helper #Converts a shekels amount to a dollar amount and outputs as a currency. def shekels_to_dollars (amount_in_shekels, options = {}) @dollar = Rate.find(1).rate if amount_in_shekels amount_in_dollars = amount_in_shekels.to_f / @dollar.to_f return number_to_currency(amount_in_dollars, options) end end
this is the db table class CreateRates < ActiveRecord::Migration def self.up create_table :rates do |t| t.column :name, :string t.column :rate, :float, :default => 0 t.column :update, :date t.column :updated_at, :datetime end end
def self.down drop_table :rates end end
Please help