Skip to content

Commit

Permalink
Merge pull request #4 from isaacmg410/master
Browse files Browse the repository at this point in the history
refact conditional  layout helper and upgrade gem version
  • Loading branch information
agustibr committed Mar 8, 2018
2 parents e2edaa5 + a3466f8 commit e7a3c17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/helpers/decidim/sabarca/layout_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ def header_section
@subtitle= ""
end
when "authorizations"
if @authorization.present?
@title= t(".authorize_with", authorizer: t("#{@authorization.try(:name)}.name", scope: "decidim.authorization_handlers"))
else
@title= t(".authorize_with", authorizer: t("#{handler.handler_name}.name", scope: "decidim.authorization_handlers"))
end
authorizer = @authorization.try(:name) || handler.handler_name
@title= t(".authorize_with", authorizer: t("#{authorizer}.name", scope: "decidim.authorization_handlers"))
@subtitle= ""
end
render "decidim/sabarca/shared/section_header_sabarca", title: @title, subtitle: @subtitle
Expand Down
2 changes: 1 addition & 1 deletion lib/decidim/sabarca/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Decidim
module Sabarca
VERSION = '0.3.0.beta'
VERSION = '0.3.1.beta'
end
end

0 comments on commit e7a3c17

Please sign in to comment.