lib/gris/grape_extensions/crud_helpers.rb in gris-0.0.8 vs lib/gris/grape_extensions/crud_helpers.rb in gris-0.0.9
- old
+ new
@@ -1,4 +1,14 @@
+# We are using a customized version of hashie_rails gem
+# to prevent ActiveModel from raising a
+# ForbiddenAttributesProtection exception when we mass
+# assign attributes.
+#
+# https://github.com/Maxim-Filimonov/hashie_rails/pull/3
+# https://github.com/dylanfareed/hashie_rails/tree/off-the-rails
+#
+require 'hashie_rails'
+
module Gris
module CrudHelpers
def create(type, options = {})
instance = type.create! options[:from]
present instance, with: options[:with]