Rails 4 find or create by method doesn't work

后端 未结 3 891
逝去的感伤
逝去的感伤 2021-01-31 14:03

I have a one to many association between jobs and companies and it works fine. In the job form view I have text_field for the company name with an autocomplete feature. The auto

3条回答
  •  面向向阳花
    2021-01-31 14:31

    This method is deprecated in rails 4.

    Rails4 release message:

    Deprecated the old-style hash based finder API. This means that methods which previously accepted "finder options" no longer do.

    It is deprecated method, but it should work. Maybe, Rails is not supporting it now.

    You can get more info click here and check 11.2 Deprecations.

提交回复
热议问题