Skip to content

Commit

Permalink
Fix the data_bag property extraction
Browse files Browse the repository at this point in the history
Closes #98
  • Loading branch information
Salim Afiune committed Feb 9, 2016
1 parent c9b2db9 commit 8ac347c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chef/resource/chef_data_bag_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(*args)
# name can either be id, or data_bag/id
property :id, String, default: lazy { name.split('/', 2)[-1] }
property :data_bag, String, default: lazy {
split = name.split('/', 2)[0]
split = name.split('/', 2)
split.size >= 2 ? split[0] : nil
}

Expand Down

0 comments on commit 8ac347c

Please sign in to comment.