(simple?) routing problem

map.connect ':controller/:action/:object_name/:mailing/:check_state',
:defaults => {:mailing => '0', :check_state => '0'}

and the URL spec. here (embedded in a call to remote_function):

:url => {:action => 'lookup_city_and_state', :object_name => 'insured',
:mailing => mailing ? '1' : '0', :check_state => check_state ? '1' :
'0'}

why do I end up with this generated URL ('artisan_qualifiers' is the
name of my controller):

/artisan_qualifiers/lookup_city_and_state/insured/1

In your call, what is the value of mailing and check_state? I'd guess that mailing => 1 and check_state => 0, and since that is the default, Rails left it off since it's not necessary.

Be interesting to see the output of:

:url => {:action => 'lookup_city_and_state', :object_name => 'insured',
:mailing => '0', :check_state => '1'}

and see if you get this:

/artisan_qualifiers/lookup_city_and_state/insured/0/1

-philip

So if a value matches the default, it won't be represented in the URL
but the param will still get that value when the controller action is
started, is that correct?

Could be... I was just guessing :slight_smile: Seems like a railish thing to do :slight_smile: