app/controllers/sections_controller.rb in artfully_ose-1.1.0 vs app/controllers/sections_controller.rb in artfully_ose-1.2.0.alpha.1
- old
+ new
@@ -11,11 +11,11 @@
render :layout => false
end
def create
@section = Section.new
- params[:section][:price] = Section.price_to_cents(params[:section][:price])
+ params[:section][:price] = TicketType.price_to_cents(params[:section][:price])
@section.update_attributes(params[:section])
@section.chart_id = @chart.id
if @section.save
Ticket.create_many(@chart.show, @section, @section.capacity, true)
else
@@ -32,18 +32,18 @@
def on_sale
@qty = params[:quantity].to_i
@section = Section.find(params[:id])
@section.put_on_sale @qty
- flash[:notice] = "Tickets in section #{@section.name} are now on sale"
+ flash[:notice] = "Tickets are now on sale"
redirect_to event_show_path(@section.chart.show.event, @section.chart.show)
end
def off_sale
@qty = params[:quantity].to_i
@section = Section.find(params[:id])
@section.take_off_sale @qty
- flash[:notice] = "Tickets in section #{@section.name} are now off sale"
+ flash[:notice] = "Tickets are now off sale"
redirect_to event_show_path(@section.chart.show.event, @section.chart.show)
end
private
\ No newline at end of file