Skip to content

Instantly share code, notes, and snippets.

@robertwclark
Last active December 11, 2015 07:29
Show Gist options
  • Select an option

  • Save robertwclark/4567003 to your computer and use it in GitHub Desktop.

Select an option

Save robertwclark/4567003 to your computer and use it in GitHub Desktop.
Dropdown for socialentity
<%= collection_select(:social_entity,:id, load_entities, :name, :id)%>
Renders
<select id="socialentity_id" name="socialentity[id]">
<option value="1" selected="selected">DataSimply</option>
<option value="2">mbonat</option>
<option value="3">OpenLabel</option>
<option value="4">scrible</option>
<option value="5">jivesoftware</option>
<option value="6">lithiumTech</option>
<option value="7">getsatisfaction</option>
<option value="8">tumblr</option>
<option value="9">nytimes</option>
<option value="10">gilt</option>
<option value="11">groupon</option>
<option value="12">Bloombergnow</option>
<option value="13">NWSCorp</option>
<option value="14">etsy</option>
<option value="15">foursquare</option>
<option value="16">Yelp</option>
<option value="17">businessinsider</option></select>
</select>
@robertwclark
Copy link
Author

I'm trying to query the database to change the scores displayed in erb based on the selection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment