How can I make a
Thanks!
How can I make a
Thanks!
Not sure to understand what you mean but something like <%=
link_to “your_link” … %>
On Jul 13, 11:29 pm, Justin To [email protected]
Tranquiliste wrote:
Not sure to understand what you mean but something like <%=
link_to “your_link” … %>On Jul 13, 11:29 pm, Justin To [email protected]
I want the actual row to be clickable… but how do I invoke an action
when on the onclick??
Thanks
Justin To wrote:
Justin To wrote:
Tranquiliste wrote:
Not sure to understand what you mean but something like <%=
link_to “your_link” … %>On Jul 13, 11:29 pm, Justin To [email protected]
I want the actual row to be clickable… but how do I invoke an action
when on the onclick??Thanks
I need something like this:
Thanks
This should work :
Justin To wrote:
Tranquiliste wrote:
Not sure to understand what you mean but something like <%=
link_to “your_link” … %>On Jul 13, 11:29 pm, Justin To [email protected]
I want the actual row to be clickable… but how do I invoke an action
when on the onclick??Thanks
I need something like this:
Thanks
nico Itkin wrote:
This should work :
Works great, but now I’m having trouble with the controller. In a
partial, I’m trying to replace_html with another partial…So I’ve got this in the first partial:
<% for user in @users %>
.
.
.
<%= remote_function :url=>{:action=>:show_user_detail, :id => user.email
} %>
.
.
.This has some problems. Firstly, It still displays 'sdf' even though I have display:none for thesdf , so what's wrong with that?In my controller, I have this:
def show_user_detail
if(request.xhr?)
render :update do |rjs|
# :params[:id] ??? I’ve no clue if I did that right.
rjs.replace_html :params[:id], :partial => ‘form’
end
else
redirect_to_index
end
endThanks for the help!
On 14 Jul 2008, at 17:08, Justin To wrote:
So I’ve got this in the first partial:
<% for user in @users %>
.
.
.
<%= remote_function :url=>{:action=>:show_user_detail, :id =>
user.email
} %>
.
.
.
You can’t have a div at the top level of a table like that. (in
addition you can’t use characters like @ in dom ids)render :update do |rjs| # :params[:id] ??? I've no clue if I did that right. rjs.replace_html :params[:id], :partial => 'form'
That should be params[:id]
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs