Class: PassType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PassType
- Extended by:
- ArtfullyOseHelper
- Includes:
- Ext::Integrations::ServiceFee, OhNoes::Destroy
- Defined in:
- app/models/pass_type.rb
Constant Summary collapse
- ALL_PASSES_STRING =
"ALL PASSES"
Constants included from Ext::Integrations::ServiceFee
Ext::Integrations::ServiceFee::SERVICE_FEE
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
Methods included from OhNoes::Destroy
Instance Method Details
#destroyable? ⇒ Boolean
43 44 45 |
# File 'app/models/pass_type.rb', line 43 def destroyable? self.passes.empty? end |
#passerize ⇒ Object
39 40 41 |
# File 'app/models/pass_type.rb', line 39 def passerize self.name.end_with?("Pass") ? self.name : self.name + " Pass" end |
#sold ⇒ Object
35 36 37 |
# File 'app/models/pass_type.rb', line 35 def sold self.passes.select{ |p| p.person_id.present? } end |