Forum: Ruby on Rails form invoking wrong action...

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0a012946a32e22f4c3a5ab6866e98e45?d=identicon&s=25 Dave Smith (smitty1276)
on 2007-07-19 17:39
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 => },
    :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 =>
0a012946a32e22f4c3a5ab6866e98e45?d=identicon&s=25 Dave Smith (smitty1276)
on 2007-07-19 17:45
Nevermind... I think I found the cause, which is just a stupid mistake.
4765b690d8d04b089b0a7b0ee7768ebc?d=identicon&s=25 Stijn Pint (spint)
on 2007-07-19 17:49
did you create a route for your action ?
if you create your route like this:
map.resource :asset_types, :member => {:create_asset_type_property =>
I think you have to pass :id => in your url_for
(all depending on the name of your controller of course)
This topic is locked and can not be replied to.