Skip to content
Row Coding
  • java
  • python
  • git
  • javascript

ruby-on-rails-5.1

Undefined method for `before_filter’

by Tarik

Try using before_action :zero_authors_or_authenticated, only: [:new, :create] Instead of before_filter :zero_authors_or_authenticated, only: [:new, :create] before_filter has been deprecated in Rails 5.0 and removed in 5.1.

Categories ruby-on-rails-5.1 Tags ruby-on-rails-5.1 Leave a comment

Rails 5.1: “unknown firstpos: NilClass” – Issue reloading application

by Tarik

I just faced exactly the same problem. I sovled it by setting: config/environments/development.rb from: # Do not eager load code on boot. config.eager_load = true to: **# Do not eager load code on boot. config.eager_load = false Hope this helps! Cheers, Nic.

Categories ruby-on-rails Tags actiondispatch, ruby-on-rails, ruby-on-rails-5.1 Leave a comment

Recent Posts

  • Error running ‘pip install’: “ImportError: No module named pip”
  • Change the default terminal in Visual Studio Code
  • How can I do tag wrapping in Visual Studio Code?
  • Is it valid to have an HTML form inside another HTML form? [duplicate]
  • Should I declare a constant instead of writing a constexpr function?
  • What is & How to use getattr() in Python?
  • Start a background process in Python
  • PATH issue with pytest ‘ImportError: No module named …’
  • Linux command to get time in milliseconds
  • Why do I get “TypeError: Missing 1 required positional argument: ‘self'”?
Copyright © 2023 Row Coding. All Rights Reserved.