gafemoyano

Joined

430 Experience
2 Lessons Completed
0 Questions Solved

Activity

Posted in Introduction to Stimulus Reflex Discussion

So how would this work if you have multiple fields on your form? Would you have to send them all to the server to persist the state? Or does it "remember" that other fields weren't submitted on the reflex? I'm guessing it doesn't, since it re renders the whole view. So would you have to bind all the values on the form to a target in a stimulus controller and send all of them?

Yeah I was trying that too!! It works fine for running regular tests I think, but it looks like you'd have to do a bit of an extra setup for system tests and chromedriver-helper. Have you had any luck running system tests?

Anybody has gotten github actions to work on the latest versions of Ruby? (2.6.4, 2.6.5)? Looks like the setup-ruby action has been outdated for a cople of months now.

Posted in Design a store credit schema

Hi, I was wondering if anyone has some experience building a store credit system into a market place style app. Eg: Users could purchase 100USD in adavance and receive 120USD in store credits as incentive. Then they could check out products with this credit.

So far I've been checkint out the solidus platform. They have two tables, one for the store_credit purchase which records the available amount, used amount and remaining amount. Then there's store_credit_events which records the individiaul transactions.
Then when it comes to payments, they handle it as another payment method which the user can select, however it starts getting very complicated as I'd need to develop a somewhat generic way to handle different payment methods.

I'm feeling a bit over my head with this and was wondering if anyone could point me in the right direction to get this feature off the ground.

Thank you,
Felipe

Posted in Direct Uploads with ActiveStorage Discussion

It's not taht it's faster, just that it's a framework officially included in rails. This means it'll be supported and easy to integrate in future rails versions.

Posted in Direct Uploads with ActiveStorage Discussion

In case anyone bumps into this response, I found out that I had setup my domain name incorrectly on the CORS configuration in Digital Ocean. So you might want to check that config out.

Posted in Direct Uploads with ActiveStorage Discussion

Hey Chris, thanks for another great video.

I've been trying to get direct uploads to work on production (it's fine on localhost) but I'm getting a Cross Origin Error when I test live with SSL enabled.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

Any idea why this might be happneing?

Cheers.


Hey Chris!

I was wondering if you've been deploying Webpacker apps with capistrano.

I've been dealing with failures due to Node.js v8.10 running out of memory on 
rake assets:precompile. 

Not sure where to look to fix this issue, since my Webpacker assets aren't that big to begin with. (React + Apollo-client do add some weight the the bundle, plus a couple custom components).

I'm runing on a standard 1GB DO droplet which I'd guess should be enough for now, I'll try increasing it's memory but it doesn't seem like a sustainable solution as my app keeps growing and I add functionality.

Anyways, just wondering if you'd encounterd a similar issue so you could point me towards the right direction to fix it.

Cheers, love your casts and this community.

Felipe
Thanks for the reply Chris!
Hey Chris, do you think it's fine for an application to use the same Redis instance for Sidekiq and as cache store? I've seen a couple of Mike Perham's comments against it from a couple years back, but it just seems like a much simpler setup to only have Redis instead of Redis + Memcached.
Are there any special considerations/configs to take into account in your experience if you plan on using Redis for both?

Thanks!

Posted in Vue.js Components in Rails Views Discussion

Hey Chris

How would you go about showing images uploaded via ActiveStorage on your vue components?
In ERB the image tag magically renders the image, but I'm not so sure how it would work on the webpacked vue files.

Posted in Recurring events with the ice_cube gem Discussion

Looks like there was a change in the value method of the FormBuilder Base class. I changed it to not pass de object around anymore on a fork, but this would make the gem not work with previous versions... anyways, I'll leave the link here in case anyone is in need of a quick fix. https://github.com/gafemoyano/recurring_select

Posted in Recurring events with the ice_cube gem Discussion

Seems like it only occurs on Rails 5.2.rc2.. I'm not sure why though.

Posted in Recurring events with the ice_cube gem Discussion

Has anyone gotten recurring_select to work on rails 5.2?? I keep getting a wrong number of attributes error no matter what I try to pass it.
Hey Chris! looks like these instructions are no longer working with the latest versions of letsencrypt that use certbot.. do you know how to get it runing with the latest version? I Tried using certbot but couldn't get it to work.

Hey Chris! Are you still using this method in production? I haven't been able to get the backup gem to work with ruby 2.4.x, have you gotten it to work with rails 5.1 and a recent ruby?

Posted in Using Vagrant for Rails Development Discussion

Looks like it's working fine. For vagrant 1.9.3 you have to add , (host_ip: "localhost") to the line config.vm.network :forwarded_port, guest: 3000, host: 3000, at least on Windows machines due to https://github.com/mitchell...

Hey Chris. I Just wanted to thank you for the quick response.

I'm actually very happy with the simple_calendar gem. At first I was a bit confused due to the simplicity ("wait is this just a table with dates?") but as I saw how easy it's been to extend and customize for my use case I'm honestly loving it.

So thanks again for putting out great things to the rails community!

Hey Chris! Is there a way I can display color coded events based on an event_type? Say in this example I could have "work_meetings" or "personal_meetings" and one would be blue and the other one yellow. Is there a way to achieve this?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.