You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rails 4 now marks any model retrieved by a query including a join as readonly. This in turn causes a ActiveRecord::ReadOnlyRecord to be raised whenever a resource is returned from with_role.
Nice catch, I'll write a failing spec scenario and investigate for a workaround. A cleaner way seems to chain a select method to the query on the resource fields.
Rails 4 now marks any model retrieved by a query including a join as readonly. This in turn causes a
ActiveRecord::ReadOnlyRecord
to be raised whenever a resource is returned from with_role.The problem seems to be here: https://github.com/EppO/rolify/blob/master/lib/rolify/adapters/active_record/resource_adapter.rb#L7
Related: http://stackoverflow.com/a/639844
The text was updated successfully, but these errors were encountered: