Sha256: 03a73a93777494400322983589860e24641b955d4ede7e3b499d70bef52c32e3

Contents?: true

Size: 724 Bytes

Versions: 25

Compression:

Stored size: 724 Bytes

Contents

module EventsHelper
  def format_detail(detail)
    case detail
    when String, Numeric then detail
    when Array           then simple_format(detail.join("\n"), :class => "simple")
    when Hash            then detail_table(detail)
    else
      detail.to_s
    end
  end
  
  def detail_table(detail)
    render :partial => 'events/detail', :object => detail
  end
  
  def breadcrumbs(*groups)
    breadcrumbs = ""
    groups.each do |group|
      breadcrumbs << "<div class='breadcrumb_divider'></div>"
      if groups.last == group
        breadcrumbs << "<a class='current'>#{group.first}</a>"
      else
        breadcrumbs << link_to(group.first, group.last)
      end
    end
    breadcrumbs.html_safe
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
whoops-0.5.1 app/helpers/events_helper.rb
whoops-0.5.0 app/helpers/events_helper.rb
whoops-0.4.0 app/helpers/events_helper.rb
whoops-0.3.5 app/helpers/events_helper.rb
whoops-0.3.4 app/helpers/events_helper.rb
whoops-0.3.3 app/helpers/events_helper.rb
whoops-0.3.2 app/helpers/events_helper.rb
whoops-0.3.1 app/helpers/events_helper.rb
whoops-0.3 app/helpers/events_helper.rb
whoops-0.2.4 app/helpers/events_helper.rb
whoops-0.2.3 app/helpers/events_helper.rb
whoops-0.2.2 app/helpers/events_helper.rb
whoops-0.2.1 app/helpers/events_helper.rb
whoops-0.2 app/helpers/events_helper.rb
whoops-0.1.10 app/helpers/events_helper.rb
whoops-0.1.9 app/helpers/events_helper.rb
whoops-0.1.8 app/helpers/events_helper.rb
whoops-0.1.7 app/helpers/events_helper.rb
whoops-0.1.6 app/helpers/events_helper.rb
whoops-0.1.5 app/helpers/events_helper.rb