Created
February 2, 2017 18:56
-
-
Save jcoyne/08c98a4c073910b9d3719de0dbbc3b25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Context < CatalogController | |
def current_ability | |
Ability.new(User.first) | |
end | |
end | |
=> :current_ability | |
context = Context.new | |
=> #<Context:0x007fcdaa2cd268 @_action_has_layout=true, @_routes=nil, @_request=nil, @_response=nil> | |
results = Hyrax::AdminSetService.new(context).search_results_with_work_count(:read) | |
results.map { |r| r.first['has_model_ssim'] } | |
=> [["AdminSet"], ["AdminSet"], ["AdminSet"], ["AdminSet"], ["AdminSet"], ["AdminSet"], ["AdminSet"], ["AdminSet"]] | |
results.map { |r| r.first['file_set_ids_ssim'] } | |
=> [nil, nil, nil, nil, nil, nil, nil, nil] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment