• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Fullscreen / bh
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: up-yard
DEFAULT BRANCH: master
Repo Added 15 Aug 2014 06:33PM UTC
Files 83
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH 1.3.0
branch: 1.3.0
CHANGE BRANCH
x
Reset
  • 1.3.0
  • 1-0-stable
  • add-cdn-helper
  • add-nav-helper
  • bump-libraries
  • extract-context-class
  • fix-error-icon-in-basic-form
  • fix-label
  • fix-link-to-without-caption
  • fix-rails-3
  • hide_fields_for_panel
  • icon-helper
  • master
  • middleman-support
  • rails-5-beta
  • up-yard
  • update-tests
  • update-travis
  • v0.0.3
  • v0.0.4
  • v0.0.5
  • v0.0.6
  • v0.0.7
  • v0.0.8
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.1.1
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v1.3.3
  • v1.3.4
  • v1.3.5
  • v1.3.6

pending completion
257

push

travis-ci

claudiob
Make `form_for` behave like `link_to` in a nav

Before this commit, using `link_to` inside the block of the `nav`
helper would wrap the `<a>` inside a `<li>` item; however using
`form_for` would **not** wrap the `<form>` inside a `<li>` item.

After this commit, both helpers work in a similar way so the code:

```rhtml
<%= nav class: 'navbar-right' do %>
  <%= link_to 'Setting', settings_path %>
  <%= form_for User.new do |f| %>
    <%= f.submit 'Sign in' %>
  <% end %>
<% end %>
```

now generates the following HTML:

```html
<ul class="navbar-right nav nav-tabs" role="tablist">
  <li>
    <a href="/">Setting</a>
  </li>
  <li>
    <form class="new_user" id="new_user" action="/" accept-charset="UTF-8" method="post">
      <input name="utf8" type="hidden" value="✓">
      <input type="hidden" name="authenticity_token" value="oPy4W/">
      <input type="submit" name="commit" value="Go">
    </form>
  </li>
</ul>
```

2022 of 2022 relevant lines covered (100.0%)

68.18 hits per line

Relevant lines Covered
Build:
Build:
2022 RELEVANT LINES 2022 COVERED LINES
68.18 HITS PER LINE
Source Files on 1.3.0
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
257 1.3.0 Make `form_for` behave like `link_to` in a nav Before this commit, using `link_to` inside the block of the `nav` helper would wrap the `<a>` inside a `<li>` item; however using `form_for` would **not** wrap the `<form>` inside a `<li>` item. Aft... push 03 Feb 2015 12:43AM UTC claudiob travis-ci pending completion  
See All Builds (334)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc