I have a tiny but silly problem over here, i have a model action;
def self.price_change_up(network, currency, change )
prices = Prices.where('network = ?', network)
prices.each do |price|
price.send("#{currency}") = price.send("#{currency}") + change
price.save
end
end
but the line
price.send("#{currency}") = price.send("#{currency}") + change
return a syntax error. What could be the problem.