Skip to content
Browse files

Use define_filter for salary_state filter.

  • Loading branch information...
1 parent cbe316d commit 9cff6a38666b5819e13b23ade61efd25bfbe3c24 @huerlisi committed May 3, 2012
Showing with 5 additions and 4 deletions.
  1. +4 −0 app/views/filters/_salary_state.html.haml
  2. +1 −4 app/views/salaries/_sidebar.html.haml
View
4 app/views/filters/_salary_state.html.haml
@@ -0,0 +1,4 @@
+- filter_name = :invoice_state
+- define_filter filter_name do
+ - params[filter_name] ||= 'all'
+ = boot_nav_filter(filter_name, ['all'] + Salary::STATES)
View
5 app/views/salaries/_sidebar.html.haml
@@ -1,4 +1 @@
-- filter_name = :invoice_state
-- params[filter_name] ||= 'all'
-- content_for :sidebar do
- = boot_nav_filter(filter_name, ['all'] + Salary::STATES)
+= render 'filters/salary_state'

0 comments on commit 9cff6a3

Please sign in to comment.
Something went wrong with that request. Please try again.