I've got a few problems with this...Hopefully it's cleaer what I'm
trying to do (work out and display two prices, one discounted / one
full). Be grateful for answers...
The total price and discounted price are not calculated correctly and
the duration is not coming through to the output page.
It's basically impossible to read this because there are almost more commented out lines than actual lines.
That said you're checking whether params[:course][:course_duration] is empty but then you're using params[:course][:duration] instead.
I've got a few problems with this...Hopefully it's cleaer what I'm
trying to do (work out and display two prices, one discounted / one
full). Be grateful for answers...
It's basically impossible to read this because there are almost more
commented out lines than actual lines.
That said you're checking whether params[:course][:course_duration]
is empty but then you're using params[:course][:duration] instead.
Fred
You got it thanks...
Now I've decided I want to access factor in my view...
but it's blank when i try <br>Factor: <%= @course.factor %>