padma-assets 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 910cca1e3aaa699237b11ecb64da1e98e70d034f
4
- data.tar.gz: d6731fecf11432fb7d4d88e5754a9966e746c135
3
+ metadata.gz: 05b65bbe9d792c95ad1dc4c08f0533158d05b75d
4
+ data.tar.gz: bf851481a0c2d2f198337758c59ed2e407c94c2d
5
5
  SHA512:
6
- metadata.gz: c856e8f7a878efde7d70799e1253a4502c04db2e6f360d5b0f927679bfe74b479c59f2d3ec5c2240d3fd2e3a2c41b6bb8654a7dda71c9a4e82e756069bafb357
7
- data.tar.gz: a984528bae390a168a2d267db09c44fd9156c3b0bf6f2792953119fdf4a25f6b0a7e0e033c9710edef65e464a577c73f46c4516947ab93292b6c67271a7f241c
6
+ metadata.gz: b1d9b9d9b1f25167ae5663a9596b4ed7ff81950938d52f40fa7fda2ae95c209e612bbed7d1467a03e7b45b7ff65cc88084c84497b90a0034c10245ea26c4789e
7
+ data.tar.gz: 195d0ddff2d9653593c55a2a916ab34c5b0f19addb980ff301cfd77d54cdc46701d5284177b430e6a6932b638827ece27af9e8895d268774fe1af7db648f8440
@@ -18,11 +18,13 @@ class GeneralAbility
18
18
  private
19
19
 
20
20
  def in_country?(user,country_name)
21
- name = user.current_account.name
22
- @country = Rails.cache.fetch("countryfor#{name}") do
23
- user.current_account.padma.country
21
+ name = user.current_account.try(:name)
22
+ if name
23
+ @country = Rails.cache.fetch("countryfor#{name}") do
24
+ user.current_account.padma.country
25
+ end
26
+ @country == country_name
24
27
  end
25
- @country == country_name
26
28
  end
27
29
 
28
30
  def alpha?(user)
@@ -46,7 +46,7 @@
46
46
  <%= t('header-menu.modules.title') %> <span class="caret"></span>
47
47
  </a>
48
48
  <ul class="dropdown-menu" role="menu">
49
- <li><%= link_to t('header-menu.modules.fnz'), APP_CONFIG['fnz-url'] %></li>
49
+ <li><%= link_to t('header-menu.modules.fnz'), APP_CONFIG['fnz-url'], target: '_blank' %></li>
50
50
  <% if can?(:manage,:planning) -%>
51
51
  <li><%= link_to t('header-menu.modules.planning'), APP_CONFIG['planning-url'] %></li>
52
52
  <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padma-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwayne Macgowan
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: accounts_client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.22
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.22
27
41
  description: Assets to be re-used in PADMA applications
28
42
  email:
29
43
  - dwaynemac@gmail.com