BrandonKlotz

Joined

2,450 Experience
23 Lessons Completed
0 Questions Solved

Activity

Posted in JSON Web Token Authentication From Scratch Discussion

Love the suggestion about rescuing and raising, really appreciate the UX thought in the comment.

Posted in Group Chat with ActionCable: Part 4 Discussion

I am also getting this, were you able to fix this?

Posted in Group Chat with ActionCable: Part 4 Discussion

Do you have a repo on github with a working Rails 5.2 version, tried these updates and it is still trying to redirect.

Trying to submit a form that has a create action in another controller but does not redirect to or render the page (just stay on the page).

Error:

MessagesController#create is missing a template for this request format and variant. request.formats: ["text/html"] request.variant: []

Form:

  = form_for [@room, Message.new], remote: true do |f| 
    .field
      = f.text_field :body, placeholder: "Message #{@room.name}", autofocus: true

Remote Controller:

class MessagesController < ApplicationController
  skip_before_action :verify_authenticity_token
  before_action :authenticate_user!
  before_action :set_room

  def create
    message = @room.messages.new(message_params)
    message.user = current_user
    message.save
    MessageRelayJob.perform_later(message)
  end

  private

    def set_room
      @room = current_user.rooms.find(params[:room_id])
    end

    def message_params
      params.require(:message).permit(:body)
    end
end

Agreed! Really digging the react stuff :D

Would anyone recommend setting up a main repo with submodules for this kind of project?

Posted in Git Submodules and how they live on Github

I've been working through the OAuth/Omni Auth Tutorial and was curious what would be a good way to set it up for github?

Would it make sense to have a seperate repo for each app (provider, client, etc.)?

Would i have a repo for the main folder which houses submodules (which to my understanding are just linked repos?

Let me know if I am understanding/thinking about this in a productive way. 😀

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.