my_model_params = params[:my_model_params] my_model = MyModel.new(JSON.parse(my_model_params))
JSON.parse from the ruby json gem allows you to parse a json string into a hash object which can then be used to create your model as you normally would in rails.
No comments:
Post a Comment