Sha256: ce6749d27b5328ce64bebb524c18aaad28ce0afe52024a99b70c0dd9155e8652

Contents?: true

Size: 297 Bytes

Versions: 4

Compression:

Stored size: 297 Bytes

Contents

module TabsHelper

  def tab_link_to(model_or_name, link, current=nil)
    model_or_name = model_or_name.model_name.human(:count => 2).capitalize if Class === model_or_name
    current ||= request.path.start_with?(link)
    link_to model_or_name, link, :class => ("current" if current)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
user_interface-0.0.5 app/helpers/tabs_helper.rb
user_interface-0.0.4 app/helpers/tabs_helper.rb
user_interface-0.0.3 app/helpers/tabs_helper.rb
user_interface-0.0.2 app/helpers/tabs_helper.rb