1 1 webcamchat login Free milf 2 way video chat
We need //= require bootstrap-sprockets in application.js, let's do that after turbolinks, and paste that in, and so now if we refresh our chat app, we should see: Settings, we can edit our user and we can log out and everything should work just as expected.
This episode is the beginning of a series where we're going to be building a chat application using rails 5 and Action Cable.
What we're going to try to do is build something a little bit more robust, like Slack for example.
One feature that we're going to delay until talking about in a future episode is the idea of marking the channels and the user's last read_at time stamp.
This is nice because if you are reading a chat that has many users in it there's a lot of conversation happening if you see a line in there that says: You saw everything up until here but then you logged out, and everything below it is new, that's a super useful feature, and we can probably add something in here into these models so that we could say: Well, this user last read this message, we could update that as we go, and we can put that in here, and then the UI front-end could determine that as well.
This should work, and let's run our rails server just to check it out, and because we have the chatroom scaffold we can use that as the route, so we can say root to: "chatrooms#index".
Now we can run rails s and open up our localhost:3000.
needs to be moved to because we want to use SCSS in order to parse this file.
Now the view we're specifically looking for are the registration ones, and we're not going to modify the sessions to allow you to log in with either an email or username, but you can also do that, there's a link in the devise wiki for how to do log in with email or username and it's really simple, but you can go do that, but if you're really interested, let me know, we can do an episode on it, but the instructions in the wiki are really simple and of course are going to be up to date whereas the video might get outdated.
So let's go edit this view, and so now we have this email field here in a form group. That's the view portion of this, now we're going to go edit the application controller to add the permitted parameters.
Each chat room is going to have many messages, and it will also have many users through a join table, so we'll have that and that's going to define the connection between when you sign in, you join a bunch of channels, when you sign out you come back, you'll be able to see those same channels that you joined, and then that way all these channels don't have to always be connected to the user, or you don't have to choose one every single time, you'll automatically go back to the channels that you were already previously interested in.
I'm just going to run the scaffold for chatroom, and if we decide we need to change it later we can change it, so we'll just modify that as necessary but for now this is good let's also generate that model in between the chat room and the user's, so this is probably just going to be really simple, and we'll say: rails g model Chatroom User chatroom:references user:references That is the join table we'll create the resources controller and routes in order for you to click on a channel and join it, that will of course need to be a feature so that we can save that permanently, but that's really as simple as those are.
Next step let's add that username field into registration so that we can keep track of people's usernames.