Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I think you don't really understand what I'm trying to do. I updated my post to give more details about what I'm doing concretely. Commented Apr 29, 2015 at 14:16
  • How is your database build? I don't see why checking for the uniqueness of the id of the item is no valid, based on what you wrote. Rails has ways to make that kind of query to the database. You don't need to pass a controller attribute to the model. Commented Apr 29, 2015 at 14:25
  • I just want to check if the id of the selected item chosen in the form exists in the array coming from the API. There is nothing about uniqueness. Commented Apr 29, 2015 at 14:29
  • You are right. There is nothing about uniqueness. Commented Apr 29, 2015 at 14:34