link_to_remote is passing :action as id and :id as action...
I have following in view...
<%= link_to_remote ''Hello'', :update =>
''list'', :url => {:action =>
''hello'', :id => project.id} %>
and in log, I get this...
Parameters:
{"authenticity_token"=>"4fd2ba43462ed37b50793a388eb2dc6bc72aceb3",
"action"=>"14", "id"=>"hello",
"controller"=>"projects"}
ActionController::UnknownAction (No action responded to 14):
I dont know whats wrong.. please help
--
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
-~----------~----~----~----~------~----~------~--~---
please check your mapping rules in file config/routes.rb and post your html source code of your page On Mar 24, 3:41 pm, "Vapor .." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> link_to_remote is passing :action as id and :id as action... > > I have following in view... > <%= link_to_remote ''Hello'', :update => ''list'', :url => {:action => > ''hello'', :id => project.id} %> > > and in log, I get this... > Parameters: > {"authenticity_token"=>"4fd2ba43462ed37b50793a388eb2dc6bc72aceb3", > "action"=>"14", "id"=>"hello", "controller"=>"projects"} > > ActionController::UnknownAction (No action responded to 14): > > I dont know whats wrong.. please help > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
tristan wrote:> please check your mapping rules in file config/routes.rb and post > your html source code of your pagenothing special actually... map.resources :projects, :has_many => :bugs, :member => {:hello => :get} # Install the default routes as the lowest priority. map.connect '':controller/:action/:id'' map.connect '':controller/:action/:id.:format'' -- 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 -~----------~----~----~----~------~----~------~--~---
I seem to have figured out the problem...
it doesn''t work in a loop a guess.
<% for post in @posts %>
<tr>
<td><%=h post.body %></td>
<td><%= link_to_remote ''Show'', :url => post,
:update => ''div2''
%></td>
<td><%= link_to ''Edit'', edit_post_path(post)
%></td>
<td><%= link_to ''Destroy'', post, :confirm =>
''Are you sure?'',
:method => :delete %></td>
</tr>
<% end %>
it won''t work up there but it would work fine with
''New'' link...
<%= link_to_remote ''New post'', :url => new_post_path,
:update => ''div2''
%>
please helppp!!
--
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
-~----------~----~----~----~------~----~------~--~---