Struggling with collect

I use a lot of this but I am struggling to get it to show the
value…I think the issue is that I have an a hash…

<%= options = [[‘Select Facility’, “” ] ] + @facilities.sort
{ |a,b| <=> }.collect {
|fac| [,] }
select ‘counseling_note’, ‘fi_facility_id’, options %>

This is fine but I want it to show the currently selected value.

How would I modify the above to show the current value (Either

@counseling_note.fi_facility_id = 9
@counseling_note.fi_facility = “Some Facility Name”
or I can set @fi_facility
or I can set @fi_facility_id

but I can’t get it to show the selected value.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs