DEV Community

ICanDoAllThingThroughChrist
ICanDoAllThingThroughChrist

Posted on

Object creations fails in Rails Console though it works in Ruby IRB{% stackoverflow 59960842 %}

I have the following subject scenario where I performed each on an array of thing1(311 service requests). It creates the new object in irb, but when I tried to use Create and Save the object to the Rails DB, it fails.Any idea why?


class Sr < ApplicationRecord
  def initialize(h)
    h.each

Top comments (0)