Files
danbooru/app/models
evazion d2e9ff363b Fix bug preventing Platinum users from commenting.
Bug:

Platinum users get this error when commenting:

    No route matches {:action=>"show", :controller=>"posts", :id=>nil}
    missing required keys: [:id]

Fix:

The issue was that `CurrentUser.role` was nil for Platinum users, which
caused `Comment.create(create_params, :as => CurrentUser.role)` to
silently ignore the create_params because the nil role wasn't in the
attr_accessible whitelist.

Despite this, things worked accidentally for other models because they
had `attr_accessible ..., :as => [:default]` in their whitelists where
the comment model didn't.
2016-12-29 15:45:23 -06:00
..
2014-04-16 17:43:34 -07:00
2014-04-16 17:43:34 -07:00
2015-12-28 12:26:20 -08:00
2016-09-19 16:47:55 -07:00
2016-02-22 17:02:15 -08:00
2015-08-18 17:40:53 -07:00
2014-04-16 17:43:34 -07:00
2014-04-16 17:43:34 -07:00
2014-06-17 15:51:18 -04:00
2014-04-16 17:43:34 -07:00
2016-12-21 11:43:46 -08:00
2016-12-21 11:43:46 -08:00
2016-09-25 14:56:19 -07:00
2015-08-18 17:40:53 -07:00