Don't pass `:class` option and a query parameter in generated url
This commit is contained in:
parent
f5160c1b4b
commit
0e1d30ec80
|
@ -130,7 +130,7 @@ module Ransack
|
|||
|
||||
def url_options
|
||||
@params.merge(
|
||||
@options.merge(
|
||||
@options.except(:class).merge(
|
||||
@search.context.search_key => search_and_sort_params))
|
||||
end
|
||||
|
||||
|
|
|
@ -735,6 +735,7 @@ module Ransack
|
|||
)
|
||||
}
|
||||
it { should match /class="sort_link desc people"/ }
|
||||
it { should_not match /people\?class=people/ }
|
||||
end
|
||||
|
||||
describe '#sort_link with class option workaround' do
|
||||
|
@ -748,6 +749,7 @@ module Ransack
|
|||
)
|
||||
}
|
||||
it { should match /class="sort_link desc people"/ }
|
||||
it { should_not match /people\?class=people/ }
|
||||
end
|
||||
|
||||
describe '#search_form_for with default format' do
|
||||
|
|
Loading…
Reference in New Issue