Can you post the block of modified navbar code that you inserted into application.html.erb? I wasn't able to catch all of it on the screen to see the changes made.
Thanks! I can't get the username to display in the navbar. The line where you define current_user.short_name throws an undefined error for the 'short_name'. I couldn't find that defined explicitly anywhere else in the program.
https://github.com/gorails-... You can find the code for the layouts from the episode there.
If you're wondering short_name is probably a method on the user.rb file in the model folder and it's probably setting short_name to whatever the users first name is. But like @ineptsoftware:disqus said, if you change it to current_user.username or current_user.email it should work :)
This was great Chris (edit sorry wrong name lol)! Thanks! I can't wait until you dive into the actual ActionCable. What is the ETA on the second episode?
Hey im new to rails and still getting quite comfortable with Ruby. But I seen that version 5.0 of Rails is out. How do I upgrade/install it? Thanks!!
You can just run "gem install rails" and that should install Rails 5. I'll be doing a screencast on upgrading an existing app to Rails 5 pretty soon.
Haven't recorded that yet, it kinda slipped my mind. Let me get on that this week!
How are you getting those icons like padlock in the text_field?
Hey Chris! I know I'm late to the party...haha! I found a way of adding custom fields with Devise that I like...
added_attrs = [:username, :email, :password, :password_confirmation, :remember_me]
devise_parameter_sanitizer.permit :sign_up, keys: added_attrs
devise_parameter_sanitizer.permit :account_update, keys: added_attrs
This makes it super easier to add additional fields in the future. Anyway, just a quick tip! :)
thank you for the tutorials. I was wondering if you could make a tutorial for setting up MacVim just like you have? I have tried myself, however, I can not seem to figure out how to do it.
Hi, this is a great tutorial so far! However, i'm having some issues near the end. After I add the Devise permitted parameters to the application controller and I try to sign up, I can no longer access the site (even after refreshing and trying to go back to the main page. It gives me a NoMethodError in Chatrooms#index. It says "undefined method `public_channels' for #<activerecord::associations::collectionproxy ="">
Did you mean? public_send" and that the error is from application.html.erb. I replaced my code in that file with yours from the github repo, but i'm still getting the same error. Can someone please point me in the right direction? Thanks!
First of all wonderful tutorial. I have a question, please see if you can help out,
I have a question model and a conversation model, a student asks a question and based on that question a teacher chats with that student. Please note only one teacher and one student are allowed in conversation per question. A student can only ask one question per email address. Now we wanna introduce a live chat support system for our support team to be able to chat with students. Now this chat room should be unique to each question and any number of support users can be present but only one student. How should I go about creating models for chat room based on your tutorial?
weird. I keep on getting this error.
ereks-MacBook-Pro-4:slack.io DerekJLin$ rails s
=> Booting Puma
=> Rails 5.2.1 application starting in development
=> Run `rails server -h` for more startup options
/Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:343:in `stat': No such file or directory @ rb_file_s_stat - /Users/DerekJLin/slack.io (Errno::ENOENT)
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:343:in `generate_restart_data'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/puma/launcher.rb:64:in `initialize'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/rack/handler/puma.rb:66:in `new'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/puma-3.12.0/lib/rack/handler/puma.rb:66:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/rack-2.0.5/lib/rack/server.rb:297:in `start'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:53:in `start'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
from /Users/DerekJLin/Desktop/slack.io/bin/rails:9:in `<top (required)>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /Users/DerekJLin/.rvm/gems/ruby-2.3.3/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /Users/DerekJLin/Desktop/slack.io/bin/spring:15:in `require'
from /Users/DerekJLin/Desktop/slack.io/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.