I have a method that I created that does some calaculation's based on an integer passed as a parameter. When I add the method to my view it only outputs the last variable.
Budget.rb(model)
def self.percent_calculate(question)
reception = question * 0.5
ceremony = question * 0.03
clothes = question * 0.1
flowers = question * 0.1
entertain = question * 0.1
photo = question * 0.12
rings = question * 0.03
misc = question * 0.02
end
index.html.erb(View)
<%= Budget.percent_calculate(5000.to_i) %>
Output from this looks is: 150.0, which is the calculation of the misc variable.
I want to output each variable out separately one after the other.