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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Nevermind... I think I found the cause, which is just a stupid mistake. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---