I'm using rails-jquery-autocomplete to fill in a `cabinet_name` in a form like this:

```
<%= autocomplete_field_tag :cabinet_name, '', cabinets_autocomplete_cabinet_name_path %>

```

Along with the other data, here are the params being passed to the device controller:

```
{"utf8"=>"✓",
"authenticity_token"=>"/0yFGrlBy0y+2ksTkQN50Dmfpw7ZWBKsO2zswAigJZI=",
"device"=>{"name"=>"Test dropdown",
"device_model_id"=>"621",
"device_unit_count"=>"1",
 "position"=>"1",
 "row_id"=>"1"},
 "cabinet_name"=>"0055-COMM-ANNEX-C3",
 "commit"=>"Create Device"}

```

As you can see there is definitely a `cabinet_name` being passed in the `device` hash. Here is the code in the `devices_controller`:

```
def create
  if params[:cabinet_name]
    @cabinet = Cabinet.where("name LIKE ? ", params[:cabinet_name])
  else
    @cabinet = Cabinet.find(params[:device][:cabinet_id])
  end
...
 @device.row_id = @cabinet.row_id

```

Here's the query that runs according to command line output, notice the:

```
  ←[1m←[35mCabinet Load (2.9ms)←[0m  SELECT `cabinets`.* FROM `cabinets` WHERE (
name LIKE '0055-COMM-ANNEX-C3' )

```

Here's the manual query and result I ran that shows a result of one cabinet record:

```
mysql> select `cabinets`.* from `cabinets` where name like '0055-COMM-ANNEX-C3'

---------------+
| id   | name               | row_id | data_center_id | cabinet_type_id | creat
d_at          | updated_at          | row_name | cabinet_name | capacity_used |
not_cabinet | grid_location_name | grid_location_id | is_rack | alias_name
   | room_id | mark_review | mark_validated | mark_audit | last_audit_note | ma
k_deleted | purpose | total_power_kpm | total_max_power_kpm | total_heat_btu |
otal_max_heat_btu | total_heat_kpm | total_max_heat_kpm | total_spec_ratings |
ean_efficiency |

------------------+----------------+--------------------+--------------------+-
---------------+
| 1389 | 0055-COMM-ANNEX-C3 |   NULL |              3 |               1 | 2012-
1-05 21:55:23 | 2012-11-21 16:21:34 | C3       | C3           |             2 |
       NULL | C3                 |             2287 |       0 | 0055-COMM-ANNEX
C3 |       4 |        NULL |           NULL |       NULL | NULL            |
     NULL | NULL    |              42 |                  64 |            200 |
              280 |              8 |                 10 |                  0 |
          NULL |

------------------+----------------+--------------------+--------------------+-
---------------+
1 row in set (0.00 sec)

```

Here's the error that the browser throws stating now Cabinet was selected:

```
undefined method `row_id' for #<ActiveRecord::Relation:0x5845368>

```

Please provide some help if you understand the problem. Thanks.