Activity
That's what local_time does. :)
Ha, no worries at all. :)
You'll need to tweak or at least work on both a bit. Basically you want to create a private Chatroom where the only two ChatroomUser records are you and the person you want to talk to.
The main thing is probably that you could create a "direct_message" attribute for Channel where you can mark it as a direct message and auto-attach the users (yourself and the person you want to DM). On create, you can attach the users to it, and then pretty much everything else probably works about the same. The navbar probably renders direct message ones separate from the main channels and should only display for users who are in it.
Posted in Advanced Search, Autocomplete and Suggestions with ElasticSearch and the Searchkick gem Discussion
Absolutely. If you've looked into ES-rails or ES-ruby gems there docs are pretty poor at best last I saw. I'm sure it's getting better and eventually will be on par with Searchkick, but for now they feel behind. Searchkick is basically a nice ruby-ish wrapper so everything feels intuitive whereas ES-rails and stuff came from non-ruby devs you can tell so it's less ruby-ish in style. I still use Searchkick on a daily basis and recommend it.
My guess is over the next year or so the official ES-rails/ruby gems will get all the nice helpers and things to make it smooth to use like Searchkick but until then you can't go wrong with Searchkick.
Posted in Setup Windows 10 Discussion
Hey Dale, you'll probably need to create that file if your Rails app doesn't have one. Some details on that file: http://edgeguides.rubyonrai...
Posted in Devise: Add a select to my signup form
What URL issues are you having?
You can use fields_for
in the form to have form set both the User and Company objects together. Your User model will need accepts_nested_attributes_for :company
on it to properly assign the attributes.
I did an example on that with this episode using the forum as an example: https://gorails.com/episodes/forum-nested-attributes-and-fields-for
Posted in Setup Windows 10 Discussion
It definitely can take a while sometimes. Depends on how powerful your computer is and stuff.The good news is you rarely need to do it so once it's done, you will be set for quite a while!
Posted in Devise: Add a select to my signup form
Jacob,
You should be fine putting it in RegistrationsController, my mistake. The main reason why they suggest ApplicationController being that not everybody overrides the RegistrationsController, so it's easier. It can definitely go in RegistrationsController too because that's really where it's being used.
I don't know about combining it, other than setting the arguments to a variable and passing in just the variable into both.
Posted in Devise: Add a select to my signup form
Yeah, I think normally the devise_paramter_sanitizer stuff has to go in ApplicationController. Not entirely sure why but I guess because it's common and that doesn't require people to override the RegistrationsController.
I don't have a video on it, but that's a good topic. My Guides link in the navbar is actually like this.
What you want to do is setup a before_action
to set your instance variables so you can use them in your partials that you include on every page. That will set it up so that you always have them available and can display them on every page.
I'll have to make a screencast on this as well!
Awesome to hear! :)
Great point Rick! That's probably a common problem for anyone trying this. Thanks for sharing that. 👍
Posted in Subscriptions with Stripe Discussion
I'm going to be doing a series on deployments coming up soon.
In the meantime, check out this episode: https://gorails.com/deploy/...
I ssh into the production machine and create the secrets.yml which we symlink on every deploy so your production secrets are kept separately and only the server.
Posted in Turbolinks 5 Forms for Mobile Discussion
I spent a bunch of my day yesterday learning iOS so I think we'll be able to make some great little example apps in some episodes soon. :D
Posted in Liking Posts Discussion
All you have to do is add a controller for it and then you can loop through current_user.likes.each do |like| and print them out on the page.
I'm not sure that it does. The only gem version that looked compatible was the very first release of it. Probably isn't worth using.
Posted in Subscriptions with Stripe Discussion
I'm not familiar with it, but it sounds like somethings up with your config there if your environment variables aren't being set. I'd double check all that stuff for production with dotenv because that seems to be your culprit.
My approach is usually to create a separate secrets.yml that only lives on production servers instead of using Dotenv.
Posted in Subscriptions with Stripe Discussion
Hey James, are you using Figaro for the .env file?
Posted in Video Series on Security for rails?
Really awesome idea for a series. I definitely want to do this as there are just so many things to cover and even if I just introduced the various things, it would be helpful. I'm going to make sure this is on my list to prioritize.