varvet / serial

Plain old Ruby for generating primitive data structures from object graphs.
107 stars 2 forks source link

Model instances do not have `model_name` in older Rails versions #9

Open jnicklas opened 8 years ago

jnicklas commented 8 years ago

Seems like this was added fairly recently. We assume that model instances respond to model_name here, but this is only available as a class method in older Rails versions.

Burgestrand commented 8 years ago

Well… damn! We might want to clone your implementation from pundit eventually anyway!