-
Rails 4, phantom ArgumentError: wrong number of arguments (0 for 1) on UserSession.find for AuthLogic
This was a total pain to locate, as the exceptions being raised were pointed to UserSession.find in Authlogic::Session::Persistence. gems in question: activerecord-session_store 0.1.1 authlogic 3.4.6 activerecord 4.2.3 rails 4.2.3 I noticed that the only meaningful difference between the two environments was the following instance variable in Rails.application.config: irb> pp Rails.application.config . . . @logger= #…
-
Pundit: NoMethodError (undefined method `verify_authorized’ for [WhateversController])
![Pundit: NoMethodError (undefined method `verify_authorized’ for [WhateversController])](https://thomaspowell.com/wp-content/uploads/2015/07/8729962194_b4cc81b2ee_z.jpg)
Sometimes, having done things several times before can make you miss the OBVIOUS. After adding after_action :verify_authorized to my ApplicationController to verify that Pundit was being used for authorization, I got the following error in rspec: 2) Jobs GET /jobs works! (now write some real specs) Failure/Error: get jobs_path NoMethodError: undefined method `verify_authorized’ for #…
-
Bootstrap 3 radio-inline and checkbox-inline elements running together.
I was having issues with Bootstrap 3 radio buttons running together even though the labels had a “radio-inline” attribute. After examining the layout of the html being generated, I realized that each individual label and radio button was being wrapped in its own containing element (in this case, a “td” element.) The reason for this is the…
