When I link_to a path containing an anchor, and I try to pass arguments to the destination, the destination action doesn't see any of the arguments I'm trying to give it. Remove the anchor from the link, and it works fine.
Here's an example. My action contains only the line:
$this->baz = $this->getRequestParameter('baz');
And my template contains:
<?php echo link_to('foo', 'common/sandbox#someanchor', array('query_string' => 'baz=3')); ?>
baz is <?php echo $baz; ?>
When I click the link, it should send a value of 3 for $baz, but it doesn't.
But if I remove '#someanchor' from link_to, then this works fine.
The right solution to this might be to add an 'anchor' option to the options array that link_to() accepts.