Navigation Menu

Skip to content

Commit

Permalink
index sorting headers retain other URL params
Browse files Browse the repository at this point in the history
  • Loading branch information
fhwang committed May 1, 2009
1 parent 5fea36d commit f32464c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/admin_assistant/column/view.rb
Expand Up @@ -95,7 +95,9 @@ def next_sort_params
next_sort_order = nil
end
end
{:sort => name_for_sort, :sort_order => next_sort_order}
@action_view.params.merge(
:sort => name_for_sort, :sort_order => next_sort_order
)
end

def value(record)
Expand Down
Expand Up @@ -223,6 +223,13 @@
it 'should show published posts' do
response.body.should match(/--published--/)
end

it 'should show a sort link for titles that includes all=1' do
assert_a_tag_with_get_args(
'Title', '/admin/blog_posts2',
{:sort => 'title', :sort_order => 'asc', :all => '1'}, response.body
)
end
end

describe '#index?all=1 with two published posts' do
Expand Down

0 comments on commit f32464c

Please sign in to comment.