ankane / searchjoy

Search analytics made easy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MassAssignmentSecurity::Error

andytime opened this issue · comments

Not sure if I'm just missing the obvious but when I try to track searches I receive:

ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes: search_type, query, results_count

I tried tracking via searchkick and adding manually.

Searchjoy::Search.create(
  search_type: "Item", 
  query: "apple",
  results_count: 12
)

Thanks for reporting! Forgot to allow mass assignment for Rails 3. Update the gem and you should be good to go.