insert id into join table
My models : class Document < ApplicationRecord belongs_to :category belongs_to :user has_one_attached :document_file has_many :document_users has_many :users, :through => :document...
Hamd repliedMy models : class Document < ApplicationRecord belongs_to :category belongs_to :user has_one_attached :document_file has_many :document_users has_many :users, :through => :document...
Hamd repliedAll i am trying to create follow and follwers relationship and i am experiencing some issues. Chris i think you should create a course on this as well. i am getting issue undefined method `id' for ...
khemlall mangal postedI am trying to make a blog website. I am using `active_admin` and `cancancan` gem. Two controllers I have made are `Post`, `Category`. **posts_controller.rb** ``` class PostsController < Inher...
pushpam kumar postedAfter lots of searching this seems pretty simple, for example, say I need three sign ins , one for admin, one for suppliers and one for members. To create a login for say supplier run ``` rails g...
Pat James repliedif you are getting the error: ```sh undefined local variable or method `form' for # ``` make sure you ***don't*** include `partial` in the render (like you would with the navbar) ```erb <%= re...
Peter repliedOk I see, you could put a status field on the member object so you can filter out members who haven't accepted their invitation and then change the status once the user has accepted the invite. Thi...
Jacob Montgomery repliedHello, I'm fairly new to Rails and I'm working on a pretty large, fairly complicated project for a friend as a way to challenge myself. (Hey, go big or go home right?). A little background: The ...
Kevin Hemphill postedSo I'm in the middle of this project and I thought I could figure it out on my own, but it appears I am in over my head here. So any advice/help you can give me would be great. Basically I'm tryi...
Andrea Fomera replied • SolvedThanks for the video Chris. Would you do this in a different way if there were multiple levels to the referral. For example: A refers B B accepts B refers C C accepts A gets rewarded for both, B...
Ajay Mishael repliedPlyr is a really nice, accessible and well-designed player for video. It has support for Vimeo. Homepage: https://plyr.io/ & Github: https://github.com/sampotts/plyr Also, [api.video](https:/...
Daniel Weaver repliedI'm still downloading this episode right now, but I want to answer your question in your email 'Should we do more refactoring and talking about how to write clean code in the future?'. And my answe...
Tito Brahmanto repliedGetting close: ``` # routes.rb authenticated :user do get '/help', to: redirect('https://help.insertyour.domain'), as: :help end unauthenticated do get '/help', to: 'home#dashbo...
Dan Tappin repliedHow do you return the token via JSON to the user after signing in in devise?
Roberto Brevé repliedI jumped on this thread late, but I would highly recommend Devise. As Chris said, it's well tested, very mature, and feature rich. As well if you really want to lock things down you can use the D...
shakycode replied • SolvedIf you use: ```` rails g model Comment commentable:references{polymorphic} ```` rails auto creates the compound index for lookup as part of the migration: ```` t.references :commentable, po...
Karl McCollester repliedInstead use `update_without_password(params)` I used `update` method, and in the line where I was validating password format I added a lambda to verify if password was nil: `validates :password, fo...
Fabiana Ramos replied • SolvedYeah, Faraday is great, especially for making gems, that way you can easily swap out the backend library that makes the HTTP requests.
Chris Oliver repliedHey Chris, I'm having a play around with this, as it's pretty amazing what it's doing. I have a question about implementing the ActionCable delivery. I can't get the notification channel to deliver...
Alan Kirk repliedI am not sure what i am doing wrong but i keep hitting ``` Started GET "/oauth/applications" for 127.0.0.1 at 2018-09-13 14:37:44 +1000 Processing by Doorkeeper::ApplicationsController#index as H...
Jeremy Bray replied