Andrea Fomera

Joined

50,780 Experience
468 Lessons Completed
5 Questions Solved

Activity

You can, though it's still going to use ActiveJob under the hood

Posted in New website design!

This looks great, great work!

Posted in Single Responsibility Principle Discussion

I think this comment misses the mark, you should use whatever tool you'd like to solve your problems. 

Chef/Ansible/Puppet/Salt/Terraform are all added DSLs/other things to learn. If all you need is a basic automation tool, and you're not going to need more, than doing it in Rails will be fine. 

Looking forward to seeing your videos on those other tools for how you would do it. 

Posted in Implementing global app settings

I would do exactly that RJ

In many of my apps I have a global scope for my settings table that just returns the last row for the settings table. Since there's only one, it returns the only one. In my controllers I just edit that global one and it's worked fine for me.

Sidenote: There's no wrong answer here

Hey Simon,

From first glance it looks like you may want to use something like Cocoon if you haven't tried that?

If you have code samples it may help more. I tend to have an easier time reasoning about things when there's code in front of me and it's not as abstract.

Posted in Looking for Rails work? / Hiring Rails developers?

ProctorU is hiring for a variety of positions. Hit me up on the GoRails slack @king601 for more information.

https://jobs.github.com/positions/de1e4448-f4ac-11e7-8f92-a501eb8aedd9

On-location in Birmingham, Alabama. We're a great team that really wants everyone to grow and learn.
Let me know before you apply and I'll give you pointers on what we're wanting/more information.

Can hit me up on my LinkedIn https://www.linkedin.com/in/andrewfomera/ or the slack :)

Personally, I think cron jobs are a great solution for only one server deployments. it keeps things simple to start for sure.

Another option if you'd prefer not to run crons is to schedule a background job to send out an email on the date you'd like it to be run at. You'd want to ensure you have a datetime on the object named expires_at.

If you had a Job named ExpiringDocumentReminderJob, you could tell it to run at a specific date/time like so:

ExpiringDocumentReminderJob.set(wait_until: (document.expires_at - 7.days)).perform_later(document)

for example using ActiveJob's api could work. There are tradeoffs to both approaches, as you have to clean up the jobs if you/the user deletes/modifies the documents expires_at and some other things.

Posted in What do you like to do away from the computer?

Hey everybody,

I'm curious what you guys like to do when you take time off from programming.

I personally like to play video games, or lately go on hikes or mountain bike. I recently bought a mountain bike and I am hooked.

So what do you do when you're not at work/programming?

Posted in On what server is Gorails hosted?

GoRails is hosted on a DigitalOcean box, last I heard ;)

DigitalOcean makes it super simple to set up servers.

You can use the GoRails referral link https://www.digitalocean.com/?refcode=87fcb9dab7a3 to get a 10$ credit to try it out ;)

Edit and check out the deploy guide if you need help deploying to it. https://gorails.com/deploy/ubuntu/16.04

Posted in Search all models gem

Searchkick with Elasticsearch is pretty good for searching models and is very flexible. It's my go-to solution with searching.

Here's an episode on Searchkick
https://gorails.com/episodes/elasticsearch-with-searckick?autoplay=1

You could also look into using Ransack I believe is another popular gem for it.

Hiya!

This is a great question and one that probably could use an in-depth reply from me other than this, but i'll try and keep it short because it's late and I should be in bed..

If you're struggling with writing code not from a tutorial for instance, I found the best thing for me to do was to build more projects. One project I did when I was somewhat new, but wanted to break away from the tutorials was sending group text messages from my app, and then give myself the ability to schedule messages to send in the future.

You can build simple apps that build on the knowledge you have from the tutorials and just every time you do a new project you try and expand the knowledge and you'll pick up more than you think.

So really my biggest piece of advice I can give is find a mentor of sorts, for me it was @shakycode and Chris and a few others. Also many in the slack channels as well that have helped me a lot the past 2+ years I've been learning/programming. Don't expect a mentor to just give in and give you an answer right away though. Many times I solved my own question by having to write out the problem I was trying to solve and the steps I've taken before I found a workaround.

I recently got my first development job in September after 2 years of not feeling ready but finally jumping in was totally worth it. The end result of learning to program is worth all of the fustration you will encounter on a day-to-day basis of feeling the struggle.

Just today I spent a long time working through a problem I had at work, but once you break it into smaller steps it is a lot more managable.

Protip: I know others have mentioned it, but pick up on more Ruby instead of some Rails stuff. Rails is just ruby, so if you pick up on trying to do more with ruby it will go a lonnnnnnnng way.

It's not about having all of the answers but being able to find them IMO.

-- Also LOL @ myself for "i'm try and keep it short"

Posted in RSpec w/capybara vs Mini Test

On the other hand, I prefer Minitest because it doesn't have a different DSL to learn while learning ruby/rails. It can be a lot to keep up with I found if you try and pick up RSpec while learning ruby. (though the one con of not going Rspec is it seems like the large majority of tutorials out there use Rspec)

As for the TDD stuff, I usually take the approach that testing is super important but I generally won't write tests first. I usually write my tests after I'm done with the feature but before I refactor it.

I usually use minitest and capybara for feature tests.

Posted in Slack forum notifications

Hey, it works!

Posted in ElasticSearch 400 error.

I believe this is an error is relating to a version of elasticsearch and Searchkick.

Can you check what version of elasticsearch you're running and what version of the searchkick gem you have in you Gemfile/Gemfile.lock?

Posted in Hi, my name is...

Hi! Welcome to the GoRails community everyone!

I have to agree that GoRails is a fantastic resource, and it's honestly my best spent money over the past 26 months I've been subscribed. If you haven't already don't forget to check out the Slack community we've got going, if you dismissed the welcome message on the dashboard links are in the account settings.

Side note: I signed up for my first half-marathon (coming up in February) and have been slacking on my training! I saw that mention of running and that made me realize I should get serious again!

Posted in Group Chat with ActionCable: Part 1 Discussion

Thanks for the kind words! If you have any feedback for improvements feel free to hit up the github issues!

Posted in macOS sierra working w/ Ruby / Rails / RBENV?

I upgraded and two of my coworkers did, but you probably want to update homebrew and whatnot before you upgrade just in case you need the latest version installed or whatnot.

Posted in FAO: Chris... URL Errors on pretty much any Rails site

^ is generally my thought as well.

Never had a need for it to be case sensitive, I feel like it only happens when you are handing direct links to users, in which case you probably want to just let them type in lower case anyways because its easier.

i.e: go to mysite.example.com/sign_up to sign up or something. Which you could easily do a redirect route if needed as well.

Posted in Controller naming...

It's convention to use the plural form for your controllers.

Example:
OrdersController -> app/controllers/orders_controller.rb, a model would be Order

If you think about it, when you define a route you most likely use resources :orders in that circumstance. Then Rails knows it's looking for an orders controller.

I hope that helps?

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.