Module: RailsPulse::ApplicationHelper
- Includes:
- BreadcrumbsHelper, ChartHelper, CspHelper, FormHelper, FormattingHelper, IconHelper, RouteHelper, StatusHelper, TableHelper, TagsHelper
- Defined in:
- app/helpers/rails_pulse/application_helper.rb
Constant Summary
Constants included from BreadcrumbsHelper
BreadcrumbsHelper::SEGMENT_CLASS_OVERRIDES
Instance Method Summary collapse
-
#humanize_time_range(time_range_symbol) ⇒ Object
Convert time range symbol to human-readable label.
- #page_url(page_number) ⇒ Object
Methods included from TagsHelper
#display_tag_badges, #render_tag_badge
Methods included from TableHelper
#cell_highlight_class, #render_cell_content
Methods included from StatusHelper
#categorize_operation, #duration_options, #duration_threshold_filter_options, #event_color, #operation_status_indicator, #operations_performance_breakdown, #truncate_sql
Methods included from RouteHelper
Methods included from IconHelper
Methods included from FormHelper
Methods included from FormattingHelper
#human_readable_occurred_at, #human_readable_summary_period, #time_ago_in_words
Methods included from CspHelper
Methods included from ChartHelper
#area_chart_options, #bar_chart_options, #base_chart_options, #line_chart_options, #render_stimulus_chart, #sparkline_chart_options
Methods included from BreadcrumbsHelper
Instance Method Details
#humanize_time_range(time_range_symbol) ⇒ Object
Convert time range symbol to human-readable label
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/helpers/rails_pulse/application_helper.rb', line 15 def humanize_time_range(time_range_symbol) case time_range_symbol.to_sym when :last_day then "last 24 hours" when :last_week then "last week" when :last_two_weeks then "last 2 weeks" when :last_month then "last month" when :last_24_hours then "last 24 hours" when :last_7_days then "last 7 days" when :last_14_days then "last 14 days" when :last_30_days then "last 30 days" when :custom then "custom range" else time_range_symbol.to_s.humanize.downcase end end |
#page_url(page_number) ⇒ Object
30 31 32 |
# File 'app/helpers/rails_pulse/application_helper.rb', line 30 def page_url(page_number) url_for(request.query_parameters.merge(page: page_number)) end |