Skip to content

Instantly share code, notes, and snippets.

@pullmonkey
Created August 11, 2012 01:10
Show Gist options
  • Save pullmonkey/3319706 to your computer and use it in GitHub Desktop.
Save pullmonkey/3319706 to your computer and use it in GitHub Desktop.
dynamic select home updating rjs
# app/views/home/update_artists.js.haml
$('#artists_select').html("#{escape_javascript(options_for_select(@artists))}");
$('#songs_select').html("#{escape_javascript(options_for_select(@songs))}");
# app/views/home/update_songs.js.haml
$('#songs_select').html("#{escape_javascript(options_for_select(@songs))}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment