Activity
Hey Ray! Have you seen this? https://github.com/plataformatec/devise/wiki/How-to:-Scope-login-to-subdomain
Posted in Backing up uploaded files (hundreds of gigs) to S3 using Backup gem without duplication on HD
Hey TL,
You're looking for the backup gem's Syncers concept: http://backup.github.io/backup/v4/syncers/
You can't use rsync with S3, but you can use this gem's S3 syncer to mirror all the files on disk with S3.
The S3 Syncer just takes some directories that you want to sync and will handle all the uploads. http://backup.github.io/backup/v4/syncer-s3/
You're looking for the backup gem's Syncers concept: http://backup.github.io/backup/v4/syncers/
You can't use rsync with S3, but you can use this gem's S3 syncer to mirror all the files on disk with S3.
The S3 Syncer just takes some directories that you want to sync and will handle all the uploads. http://backup.github.io/backup/v4/syncer-s3/
Posted in Any gem to create a 'What's new' page like the one I see in https://www.hatchbox.io/announcements
All the code for this the feature is in https://github.com/excid3/jumpstart
You'll want to grab:
1. Database column on User for last read announcements timestamp
2. Announcements model
3. Announcements routes, controller, and views
4. The navbar code to highlight the What's New link when there is are unread announcements for the user.
You'll want to grab:
1. Database column on User for last read announcements timestamp
2. Announcements model
3. Announcements routes, controller, and views
4. The navbar code to highlight the What's New link when there is are unread announcements for the user.
Posted in Where to get started?
It's either on the dashboard (click the logo in the navbar) as the 3rd step in the Welcome section, or on your account profile here: https://gorails.com/users/edit
Posted in Where to get started?
Don't forget to join us in Slack if you want to hang out and chat with us!
Posted in Where to get started?
Hey Justin!
I would probably recommend starting at the very first episodes. I covered a lot of the things you'll do in every app at the beginning and then started branching out to more features as time went on.
I would probably recommend starting at the very first episodes. I covered a lot of the things you'll do in every app at the beginning and then started branching out to more features as time went on.
Posted in how do i resolve this error?
Hey Alan!
Change your "book_params" method at the bottom of the controller to "recipe_params" and you should be good. Looks like just a copy-paste typo you missed. 🤓
Change your "book_params" method at the bottom of the controller to "recipe_params" and you should be good. Looks like just a copy-paste typo you missed. 🤓
Hey Jeff,
You want to either use the local_time gem to handle this client side or simply set the Time.zone to the user's timezone for every request.
For the second option, you have to save the timezone on their database record so you can retrieve it and set it every time.
local_time's a lot simpler as it just checks the browser's timezone and converts all the times using JS.
You want to either use the local_time gem to handle this client side or simply set the Time.zone to the user's timezone for every request.
For the second option, you have to save the timezone on their database record so you can retrieve it and set it every time.
local_time's a lot simpler as it just checks the browser's timezone and converts all the times using JS.
Thanks btihen! I'll get the tutorial updated for its changes shortly!
Posted in How to render ssh output
I'm moving this weekend, but I'll try and make an episode on this next week along with my continuation of the SOLID series!
Posted in How to render ssh output
Hey Quentin, I haven't covered it anywhere but I'd be happy to. Are you wanting to stream SSH output too or something similar?
Not sure, but you might check the git repo. I updated it to Rails 5.1 and Ruby 2.5 recently. Rails 5.2 shouldn't cause any differences but the webpacker gem does change frequently.
I didn't cover it. Early screencasting mistake. You can follow this episode to install Bootstrap. https://gorails.com/episodes/bootstrap-4-rubygem
Posted in Update an attribute on belongs_to
Hey Alan,
You kind of have two options:
1. Having nested fields for the product_groups. Primarily this would be just letting you add / remove these and then have a select box to choose which group. The gem cocoon would be good for this.
2. Having nested fields for the groups. This skips the product_group and the join association would be automatically created for you. This you could use checkboxes or a multi-select, but it wouldn't let you define other fields on the join table (if you needed to do that). It is a lot simpler though.
You kind of have two options:
1. Having nested fields for the product_groups. Primarily this would be just letting you add / remove these and then have a select box to choose which group. The gem cocoon would be good for this.
2. Having nested fields for the groups. This skips the product_group and the join association would be automatically created for you. This you could use checkboxes or a multi-select, but it wouldn't let you define other fields on the join table (if you needed to do that). It is a lot simpler though.
Posted in How do I generate dynamic classes?
It looks like it's possible if you do something like this: https://stackoverflow.com/questions/44261759/define-a-dynamic-class-name-in-the-dom-with-scss
Posted in Rails Application Templates Discussion
Hey Josh,
Administrate gem just needed updating. Should be fixed now!
Administrate gem just needed updating. Should be fixed now!
I've been using Redis for Rails cache + Sidekiq for years now. Absolutely no problems. There's probably some rare situation that could cause trouble, but I prefer the simplicity of managing less services in production and it's worked just fine.
Posted in Form errors not displaying
No problemo! It's one of those subtleties of Rails that you have to learn the frustrating / hard way. 😜
Posted in Form errors not displaying
Hey RJ!
When you redirect, none of the variables are persisted over because you're making a totally new request. You must `render action: :edit` in the else clause in order to render the errors on the model.
When you redirect, none of the variables are persisted over because you're making a totally new request. You must `render action: :edit` in the else clause in order to render the errors on the model.
Posted in Open Closed Principle Discussion
For most of this, I knew there was going to be a lot of code so I'd start doing the single responsibility work separation of this code into its own files and folders first. I didn't build this multi-provider thing out until I supported more than just DigitalOcean.
It's really easy to refactor your code into this, so it's not something you need to start with ahead of time. In fact, trying to follow design patterns too early is often one of the easiest ways to end up with confusing code. Refactoring to apply patterns later on is usually the best approach.
It's really easy to refactor your code into this, so it's not something you need to start with ahead of time. In fact, trying to follow design patterns too early is often one of the easiest ways to end up with confusing code. Refactoring to apply patterns later on is usually the best approach.