Module: StripeInvoice::ApplicationHelper
- Defined in:
- app/helpers/stripe_invoice/application_helper.rb
Instance Method Summary collapse
- #format_timestamp(timestamp) ⇒ Object (also: #ft)
-
#stripe_invoice_controller? ⇒ Boolean
returns TRUE if the controller belongs to StripeInvoice false in all other cases, for convenience when executing filters in the main application.
Instance Method Details
#format_timestamp(timestamp) ⇒ Object Also known as: ft
4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/stripe_invoice/application_helper.rb', line 4 def () dt = unless .is_a? DateTime dt = Time.at().to_datetime end l(dt, :format => :short_date) end |
#stripe_invoice_controller? ⇒ Boolean
returns TRUE if the controller belongs to StripeInvoice false in all other cases, for convenience when executing filters in the main application
19 20 21 |
# File 'app/helpers/stripe_invoice/application_helper.rb', line 19 def stripe_invoice_controller? is_a? StripeInvoice::ApplicationController end |