Skip to content

Instantly share code, notes, and snippets.

@hendricius
Last active August 29, 2015 14:10
Show Gist options
  • Save hendricius/ac22642cc72a0c2260fa to your computer and use it in GitHub Desktop.
Save hendricius/ac22642cc72a0c2260fa to your computer and use it in GitHub Desktop.
# UI
a ng-href="/vessels?angular_filter[code]={{ sched.code }}"
| {{sched.code}}
# ApplicationController
before_filter do
gon.app_name = "Docking"
gon.angular_filter = params[:angular_filter] if params[:angular_filter]
end
# Controller on the new page
# Check for parameters from the controller.
if gon.angular_filter
_.each gon.angular_filter, (value, key)->
$scope.tableParams.filter()[key] = value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment