Hello, I've been recently integrated with your gem, and that is a wonderful piece of art. Helped me a lot, thank you. You did a great job.
I found some places that might be improved or changed according to my understanding:
-
Some models missed the dependent and inverse_of for associations.
-
No generator for models (needed for sharding and fixing associations).
-
No way to attach API routes without a dashboard, when the dashboard isn't required or forbidden.
-
Shouldn't the line 27 be moved to the 32? Is there a reason to generate stale pkpass?
|
pass_output_path = Passkit::Generator.new(pass).generate_and_sign |
|
|
|
response.headers["last-modified"] = pass.last_update.httpdate |
|
if request.headers["If-Modified-Since"].nil? || |
|
(pass.last_update.to_i > Time.zone.parse(request.headers["If-Modified-Since"]).to_i) |
|
send_file(pass_output_path, type: "application/vnd.apple.pkpass", disposition: "attachment") |
-
I was curious what is the reason for having multiple passes per one generator? I mean when we have the same class for pass and generator. I've patched that to use find_or_create_by! but I'm wondering, maybe I'm missing something? Wouldn't it create a lot of redundant records?
|
def create_pass(pass_class, generator = nil) |
|
pass = Passkit::Pass.create!(klass: pass_class, generator: generator) |
|
Passkit::Generator.new(pass).generate_and_sign |
Maybe those findings would be helpful. If they are helpful somehow, I can help with some of them if needed.
Hello, I've been recently integrated with your gem, and that is a wonderful piece of art. Helped me a lot, thank you. You did a great job.
I found some places that might be improved or changed according to my understanding:
Some models missed the dependent and inverse_of for associations.
No generator for models (needed for sharding and fixing associations).
No way to attach API routes without a dashboard, when the dashboard isn't required or forbidden.
Shouldn't the line 27 be moved to the 32? Is there a reason to generate stale pkpass?
passkit/app/controllers/passkit/api/v1/passes_controller.rb
Lines 27 to 32 in c7ef36a
I was curious what is the reason for having multiple passes per one generator? I mean when we have the same class for pass and generator. I've patched that to use
find_or_create_by!but I'm wondering, maybe I'm missing something? Wouldn't it create a lot of redundant records?passkit/lib/passkit/factory.rb
Lines 5 to 7 in 3522c16
Maybe those findings would be helpful. If they are helpful somehow, I can help with some of them if needed.