ankane/searchjoy

Can't mass-assign protected attributes for Searchjoy::Search: user_id, source

ACPK opened this issue · 3 comments

ACPK commented

When the application tries to save a search done via Searchkick, i get:

Can't mass-assign protected attributes for Searchjoy::Search: user_id, source

You should be able to create an initializer with:

class Searchjoy::Search
  attr_accessible :search_type, :query, :results_count, :custom_field_1, :custom_field_2
end
ACPK commented

@ankane - Should the user_id attr_accessible be mentioned in the docs as it says it should just work with SearchKick?

Same as #21 - support for attr_accessible will be removed in the next version, so going to close.