Skip to content

Commit

Permalink
Fix code quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Jul 9, 2017
1 parent 124aa58 commit 7a7882f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion publify_core/config/routes.rb
Expand Up @@ -6,7 +6,7 @@
get ':year', to: 'articles#index', year: /\d{4}/, as: 'articles_by_year', format: false
get ':year/page/:page', to: 'articles#index', year: /\d{4}/, as: 'articles_by_year_page', format: false

get 'articles.:format', to: 'articles#index', constraints: {format: /rss|atom/}, as: 'articles_feed'
get 'articles.:format', to: 'articles#index', format: /rss|atom/, as: 'articles_feed'

get 'sitemap.xml', to: 'xml#sitemap', format: 'googlesitemap'

Expand Down
2 changes: 1 addition & 1 deletion publify_core/lib/sidebar_field.rb
Expand Up @@ -81,7 +81,7 @@ class CheckBoxField < self
def line_html(sidebar)
content = hidden_field_tag(input_name(sidebar), 0) +
content_tag('label',
safe_join([check_box_tag(input_name(sidebar), 1, current_value(sidebar), options), label], ' '))
check_box_tag(input_name(sidebar), 1, current_value(sidebar), options) + label)
content_tag('div', content, class: 'checkbox')
end

Expand Down
27 changes: 13 additions & 14 deletions spec/models/sidebar_registry_spec.rb
Expand Up @@ -3,20 +3,19 @@
describe SidebarRegistry do
describe '#available_sidebars' do
it 'finds at least the standard sidebars' do
expect(SidebarRegistry.available_sidebars).to include(
AmazonSidebar,
ArchivesSidebar,
AuthorsSidebar,
LivesearchSidebar,
MetaSidebar,
NotesSidebar,
PageSidebar,
PopularSidebar,
SearchSidebar,
StaticSidebar,
TagSidebar,
XmlSidebar
)
expect(SidebarRegistry.available_sidebars).
to include(AmazonSidebar,
ArchivesSidebar,
AuthorsSidebar,
LivesearchSidebar,
MetaSidebar,
NotesSidebar,
PageSidebar,
PopularSidebar,
SearchSidebar,
StaticSidebar,
TagSidebar,
XmlSidebar)
end
end
end

0 comments on commit 7a7882f

Please sign in to comment.