-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds links to the 'validates' handler. It links to the docs for the standard links and custom types can be added by calling YARD::Handlers::Ruby::ActiveRecord::Validate.add_validation_type( type, link )
- Loading branch information
1 parent
7fe2708
commit f680f6c
Showing
4 changed files
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
<p class="tag_title">Validations<% if @condition %> (<i><%= @condition %></i> )<% end %>:</p> | ||
<ul class="validations"> | ||
<% for tag in @tags %> | ||
<% for type in tag.types %> | ||
<li><%= type %></li> | ||
<% tag.types.each do | type, options | %> | ||
<li> | ||
<% if link = YARD::Handlers::Ruby::ActiveRecord::Validate.link_for_validation( type ) %> | ||
<%= linkify(link, type.capitalize ) %> | ||
<% else %> | ||
<%= type.capitalize %> | ||
<% end %> | ||
<% if options %> (<%= options %>) <% end %> | ||
</li> | ||
<% end %> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters