Form invoking wrong action

I have a form that is supposed to call the ‘create_asset_type_property’
action. For some reason, it always invokes the action ‘update’, and
gives me the error message “Unknown action: No action responded to
update”. Any ideas why?

Here’s the form…

<% form_remote_tag(
:url => url_for(:action => ‘create_asset_type_property’),
:html => { :asset_type_id => asset_type.id },
:complete => “$(‘createAssetPropertyNameField’).value = ‘’;” +
“$(‘createAssetPropertyDescriptionField’).value = ‘’;”
) do %>
blah blah blah
<% end %>

My action is in the controller…

def create_asset_type_property
@ … create and save the data here …

render :update do |page|
page.replace_html “assetTypePropertyListContainer”, :partial =>
‘asset_type_property_list_table’
end
end

Nevermind… I think I found the cause, which is just a stupid mistake.

did you create a route for your action ?
if you create your route like this:
map.resource :asset_types, :member => {:create_asset_type_property =>
:post}
I think you have to pass :id => asset_type.id in your url_for
(all depending on the name of your controller of course)