Skip to content

Instantly share code, notes, and snippets.

@cliche2004
cliche2004 / fee.rb
Created Jun 7, 2013
common structure
View fee.rb
module MdAuditTrail
module Record
module SpAdmin
class Fee < Base
@@can_be_called_from = [ :plans, :providers, :procedures ]
private
# add other needed associated field
@cliche2004
cliche2004 / ticket.rb
Created May 24, 2013
changes for ticket fee generation
View ticket.rb
def ticket_price
return self.site_promo_price || self.price
end
def override_ticket_fee?
@override_ticket_fee == '1' ? true : false
end
def generate_ticket_fee
generated_ticket_fee = if override_ticket_fee?
@cliche2004
cliche2004 / form
Created Feb 14, 2013
heroku throwing AbstractionError
View form
<%= form_tag process_order_payments_url(subdomain: 'secure', domain: Settings.domain),
method: 'post', class: "ticket_form",
id: 'ticketSelectionForm' do %>
<%= render partial: 'events/ticket', collection: @tickets %>
<%= hidden_field_tag :event_id, @event.id %>
<%= hidden_field_tag :promo_code, @promoter.promoter_code if @promoter %>
<%= hidden_field_tag :session_id, cookies[:order_session_id] %>
<%= hidden_field_tag :custom_domain, @custom_domain.present? %>