Module: RailsMetricsHelper

Includes:
Links, Pagination, PayloadInspect, Scoping
Defined in:
app/helpers/rails_metrics_helper.rb

Defined Under Namespace

Modules: Links, Pagination, PayloadInspect, Scoping

Instance Method Summary collapse

Methods included from Links

#add_action_links!, #link_to_image_unless_current, #nagivation_links

Methods included from Scoping

#link_to_clear_by_scope, #link_to_order_by_scopes, #link_to_set_by_scope, #scopes_info

Methods included from PayloadInspect

#payload_inspect, #pretty_inspect

Methods included from Pagination

#next_link, #paginate!, #pagination_info, #previous_link, #show_per_page

Instance Method Details

#pagination_and_scopes_info(countable) ⇒ Object

Returns pagination and scopes information



152
153
154
155
# File 'app/helpers/rails_metrics_helper.rb', line 152

def pagination_and_scopes_info(countable)
  countable = countable.to_s.pluralize unless @metrics_count == 1
  "Showing #{pagination_info} #{countable} ".html_safe << scopes_info
end

#rails_metrics_table_row_for(metric, &block) ⇒ Object

Create a table row using rails_metrics_#id as row id and odd and even as classes.



158
159
160
# File 'app/helpers/rails_metrics_helper.rb', line 158

def rails_metrics_table_row_for(metric, &block)
  (:tr, :id => "rails_metric_#{metric.id}", :class => cycle("odd", "even"), &block)
end