Skip to content

Instantly share code, notes, and snippets.

@melhotiby
Last active August 29, 2015 14:14

Revisions

  1. melhotiby revised this gist Feb 6, 2015. 2 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
  2. melhotiby created this gist Feb 6, 2015.
    4 changes: 4 additions & 0 deletions whatever.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    jQuery ($) ->
    $('html').on 'change', '[data-reload]', (e) ->
    e.preventDefault()
    window.location = "#{$(this).data('url')}&#{$(this).data('params')}=#{$(this).val()}"
    1 change: 1 addition & 0 deletions whatever.html.haml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    = select_tag :facility, options_for_select(['apples', 'oranges'], params[:facid]), data: { reload: true, url: spaces_path(q: params[:q]), params: 'facid' }