Class: DoorList

Inherits:
Object
  • Object
show all
Extended by:
ArtfullyOseHelper
Defined in:
app/models/door_list.rb

Defined Under Namespace

Classes: Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ArtfullyOseHelper

amount_and_nongift, bootstrapped_type, build_action_path, build_order_location, channel_checkbox, channel_text, check_mark, clean_full_error_messages, contextual_menu, credit_card_message, date_field_tag, datetime_field_tag, events_to_options, fully_qualified_asset_path, get_selected_class, icon_link_to, icon_tag, link_to_add_fields, link_to_remove_fields, nav_dropdown, number_as_cents, number_to_dollars, pluralize_word, refund_header, select_event_for_sales_search, select_membership_type_for_sales_search, select_pass_type_for_sales_search, select_show_for_sales_search, sorted_us_state_abbreviations, sorted_us_state_names, thanks_message, ticket_seller_name, time_ago_sentence, time_zone_description, us_states, verb_for_save, widget_script, with_kit

Methods included from LinkHelper

#active?, #active_link_to, #active_section, #calendar_active_link_to, #in_section, #in_section?, #in_sub_section

Constructor Details

#initialize(show) ⇒ DoorList

Returns a new instance of DoorList.



5
6
7
# File 'app/models/door_list.rb', line 5

def initialize(show)
  @show = show
end

Instance Attribute Details

#showObject (readonly)

Returns the value of attribute show.



2
3
4
# File 'app/models/door_list.rb', line 2

def show
  @show
end

Instance Method Details

#itemsObject



13
14
15
# File 'app/models/door_list.rb', line 13

def items
  @items ||= tickets.map { |t| Item.new t, t.buyer }.sort
end

#ticketsObject



9
10
11
# File 'app/models/door_list.rb', line 9

def tickets
  @tickets ||= Ticket.where(:show_id => show.id).includes(:buyer, :ticket_type, :items => :order).select(&:committed?)
end