coorasse / passkit

Wallet Pass generation for Ruby On Rails
MIT License
90 stars 27 forks source link

Urlgenerator with collection_name doesnt work #39

Closed JoeyHaalboom closed 1 month ago

JoeyHaalboom commented 1 month ago

Passkit::UrlGenerator.new(Passkit::CartTicket, {generator: @cart, collection_name: :tickets}).android → undefined method `id' for an instance of Hash

Passkit::UrlGenerator.new(Passkit::CartTicket, @cart, :tickets).android → wrong number of arguments (given 3, expected 1..2)

I tried the following ways to generate a url for multiple tickets from a cart. But both options returns errors. What am I doing wrong? Without the collection: Passkit::UrlGenerator.new(Passkit::CartTicket, Ticket.last).android everything works fine.

JoeyHaalboom commented 1 month ago

Fixed it by changing the gemfile to: gem 'passkit', git: "https://github.com/coorasse/passkit.git"

The 7.0 release isn't on rubygems.