[issue #428] Fixed typo in PlatformsHelper

This commit is contained in:
George Vinogradov 2012-05-10 19:30:41 +04:00
parent f8d32495b8
commit 9a0f582a16
7 changed files with 9 additions and 11 deletions

View File

@ -5,7 +5,7 @@ module PlatformsHelper
return platform.released ? '/update' : '/release'
end
def platfrom_printed_name(platform)
def platform_printed_name(platform)
return "" unless platform
platform.released? ? "#{platform.name} #{I18n.t("layout.platforms.released_suffix")}" : platform.name
end

View File

@ -2,6 +2,6 @@
%td= link_to advisory.advisory_id, advisory_path(advisory)
%td
- advisory.platforms.each do |platform|
= link_to platfrom_printed_name(platform), platform_path(platform)
= link_to platform_printed_name(platform), platform_path(platform)
%br
%td= truncate(advisory.description, :length => 50)

View File

@ -18,7 +18,7 @@
.leftlist= "#{t("layout.advisories.affected_versions")}:".html_safe
.rightlist
- @advisory.platforms.each do |platform|
= link_to platfrom_printed_name(platform), platform_path(platform)
= link_to platform_printed_name(platform), platform_path(platform)
%br
.both

View File

@ -1,5 +1,5 @@
- content_for :submenu do
- act = action_name.to_sym; contr = controller_name.to_sym
.left= platfrom_printed_name(@platform)
.left= platform_printed_name(@platform)
%nav
%ul

View File

@ -6,5 +6,5 @@
%tbody
- @platforms.each do |platform|
%tr{:class => cycle("odd", "even")}
%td= link_to platfrom_printed_name(platform), platform_path(platform)
%td= link_to platform_printed_name(platform), platform_path(platform)
%td= platform.distrib_type

View File

@ -78,8 +78,6 @@
= f.fields_for @build_list.build_advisory do |f|
= render :partial => 'advisories/advisories/form', :locals => {:f => f}
=# link_to t("layout.publish"), publish_build_list_path(@build_list), :method => "put", :confirm => t("layout.confirm"), :class => "button tmargin10" if @build_list.can_publish? and can?(:publish, @build_list)
=# link_to t("layout.reject_publish"), reject_publish_build_list_path(@build_list), :method => "put", :confirm => t("layout.confirm"), :class => "button tmargin10" if @build_list.can_reject_publish? and can?(:reject_publish, @build_list)
= submit_tag t("layout.publish"), :confirm => t("layout.confirm"), :name => 'publish' if @build_list.can_publish? and can?(:publish, @build_list)
= submit_tag t("layout.reject_publish"), :confirm => t("layout.confirm"), :name => 'reject_publish' if @build_list.can_reject_publish? and can?(:reject_publish, @build_list)

View File

@ -18,7 +18,7 @@ describe Platform do
it { should validate_presence_of(:name)}
it { should validate_uniqueness_of(:name).case_insensitive }
it { should validate_format_of(:name).with('Basic_platfrom-name-1234') }
it { should validate_format_of(:name).with('Basic_platform-name-1234') }
it { should validate_format_of(:name).not_with('.!') }
it { should validate_presence_of(:description) }
it { should validate_presence_of(:distrib_type) }