Skip to content

Commit

Permalink
fixed tag helper documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 20, 2011
1 parent 029a624 commit bceca8e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -363,10 +363,10 @@ show them as default.
You can also use C<param> to set them manually and let necessary attributes
always be generated automatically.
<% param country => 'germany' unless param 'country' %>
<%= radio_button 'country', value => 'germany' %> Germany
<%= radio_button 'country', value => 'france' %> France
<%= radio_button 'country', value => 'uk' %> UK
% param country => 'germany' unless param 'country';
<%= radio_button country => 'germany' %> Germany
<%= radio_button country => 'france' %> France
<%= radio_button country => 'uk' %> UK
=head1 HELPERS
Expand Down Expand Up @@ -464,15 +464,13 @@ Generate image tag.
<%= input_tag 'first_name' %>
<%= input_tag first_name => 'Default name' %>
<%= input_tag 'employed', type => 'checkbox' %>
<%= input_tag 'country', type => 'radio', value => 'germany' %>
Generate form input element.
Previous input values will automatically get picked up and shown as default.
<input name="first_name" />
<input name="first_name" value="Default name" />
<input name="employed" type="checkbox" />
<input name="country" type="radio" value="germany" />
=head2 C<javascript>
Expand Down

0 comments on commit bceca8e

Please sign in to comment.