Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Api::Utils.resource_search_by_href_slug helper method #14443

Merged
merged 2 commits into from Mar 27, 2017

Conversation

@abellotti
Copy link
Member

abellotti commented Mar 21, 2017

  • Added Api::Utils.resource_search_by_href_slug helper method
  • Added related rspec
Added related rspec
@abellotti

This comment has been minimized.

Copy link
Member Author

abellotti commented Mar 21, 2017

/cc @Fryguy @mkanoor @gmcculloug as promised, please review. Thanks.

@gmcculloug

This comment has been minimized.

Copy link
Member

gmcculloug commented Mar 21, 2017

Easily my second favorite href_slug related PR of the day. 😃 Thanks for getting this out. 👍

@@ -5,5 +5,15 @@ def self.build_href_slug(klass, id)
collection = Api::CollectionConfig.new.name_for_subclass(klass)
"#{collection}/#{id}" if collection
end

def self.resource_search_by_href_slug(href_slug)

This comment has been minimized.

Copy link
@mkanoor

mkanoor Mar 22, 2017

Contributor

@abellotti can we pass in the user_object here with the default being User.curent_user

def self.resource_search_by_href(href_slug, user = User.current_user)

This comment has been minimized.

Copy link
@abellotti

abellotti Mar 22, 2017

Author Member

Sure, didn't know the usage from your side. Will update. 👍

@abellotti abellotti force-pushed the abellotti:api_resource_search_by_href_slug branch Mar 22, 2017
User.current_user or specified user must be specified
Updated tests for the new signature
@abellotti abellotti force-pushed the abellotti:api_resource_search_by_href_slug branch to d727f00 Mar 22, 2017
@abellotti

This comment has been minimized.

Copy link
Member Author

abellotti commented Mar 22, 2017

@mkanoor updated as discussed. Thanks!!

@miq-bot

This comment has been minimized.

Copy link
Member

miq-bot commented Mar 22, 2017

Checked commits abellotti/manageiq@2c618ab~...d727f00 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🏆

@mkanoor

This comment has been minimized.

Copy link
Contributor

mkanoor commented Mar 22, 2017

👍

@abellotti

This comment has been minimized.

Copy link
Member Author

abellotti commented Mar 23, 2017

anything else needed here ? can this be merged ?

Copy link
Member

gtanzillo left a comment

👍

@gtanzillo gtanzillo merged commit 168690d into ManageIQ:master Mar 27, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.7%) to 4.337%
Details
@abellotti abellotti deleted the abellotti:api_resource_search_by_href_slug branch Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.