Displaying 2 results from an estimated 2 matches for "num_cat".
Did you mean:
numcat
2006 Jul 21
1
RJS Failing
...n the controller). I can successfully
create a new link but I get a TypeError when I leave all form fields
blank -- I expect to see validation error messages.
---
#link_controller.rb:
def create
link = Link.new(params[:link])
saved = link.save
num_links = Link.find(:all).size
num_cats = Category.find(:all).size
if request.xhr?
render:update do |page| page.update_link_list(link, saved,
num_links, num_cats) end
return
end
if saved
flash[:message] = ''Link was successfully created.''
redirect_to :action => ''list'...
2006 Jul 16
6
How to access element attributes using RJS?
For example, in the following block:
page.select(''.foo'').each do |element|
...
end
How would I access, just for example, the id attribute of each element in
the collection?
I''ve randomly tried element.id and element.attributes[''id''], but neither of
those has worked. I''ve also been unsuccessful in finding any documentation
on this, but it