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

At least model#destroy is broken with multiple url parameters #25

Closed
PragTob opened this issue May 12, 2014 · 1 comment
Closed

At least model#destroy is broken with multiple url parameters #25

PragTob opened this issue May 12, 2014 · 1 comment

Comments

@PragTob
Copy link
Contributor

PragTob commented May 12, 2014

Given this resource:

module Xikolo
  module Wiki
    class Wiki < Acfs::Resource
      service Xikolo::Wiki::Client, path: '/:parent_resource/wikis'

      attribute :id, :uuid
      attribute :parent_resource, :string
    end
  end
end

The destroy action does not work since it never even starts to track the parent_resource. E.g. it only adds the id:

     def delete!(opts = {})
        opts[:params] ||= {}
        opts[:params].merge! id: id

        operation :delete, opts do |data|
          update_with data
          freeze
        end
      end

And as a result the following error is raised: Cannot replace path argumentparent_resource' with empty string.`

Because the Location thingy can't extract that parameter to replace it, since the data is never handed to it.

Try at a fix incoming.

@PragTob
Copy link
Contributor Author

PragTob commented May 26, 2014

Fixed by #26

@PragTob PragTob closed this as completed May 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant