diff --git a/app/helpers/platforms_helper.rb b/app/helpers/platforms_helper.rb index fffc69c94..4ad7df6ac 100644 --- a/app/helpers/platforms_helper.rb +++ b/app/helpers/platforms_helper.rb @@ -4,10 +4,10 @@ module PlatformsHelper return "" unless platform 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 - + end diff --git a/app/views/advisories/advisories/_list_item.html.haml b/app/views/advisories/advisories/_list_item.html.haml index 671b43854..21486904f 100644 --- a/app/views/advisories/advisories/_list_item.html.haml +++ b/app/views/advisories/advisories/_list_item.html.haml @@ -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) diff --git a/app/views/advisories/advisories/show.html.haml b/app/views/advisories/advisories/show.html.haml index 99ea5e348..483ba81a9 100644 --- a/app/views/advisories/advisories/show.html.haml +++ b/app/views/advisories/advisories/show.html.haml @@ -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 diff --git a/app/views/platforms/base/_submenu.html.haml b/app/views/platforms/base/_submenu.html.haml index 002546ebf..072971af2 100644 --- a/app/views/platforms/base/_submenu.html.haml +++ b/app/views/platforms/base/_submenu.html.haml @@ -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 diff --git a/app/views/platforms/platforms/_list.html.haml b/app/views/platforms/platforms/_list.html.haml index b146945a7..1ac3c3353 100644 --- a/app/views/platforms/platforms/_list.html.haml +++ b/app/views/platforms/platforms/_list.html.haml @@ -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= platform.distrib_type \ No newline at end of file + %td= link_to platform_printed_name(platform), platform_path(platform) + %td= platform.distrib_type diff --git a/app/views/projects/build_lists/show.html.haml b/app/views/projects/build_lists/show.html.haml index 2c0ea1baf..b98aed63b 100644 --- a/app/views/projects/build_lists/show.html.haml +++ b/app/views/projects/build_lists/show.html.haml @@ -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) diff --git a/spec/models/platform_spec.rb b/spec/models/platform_spec.rb index bb780e03f..d8487ee1a 100644 --- a/spec/models/platform_spec.rb +++ b/spec/models/platform_spec.rb @@ -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) }