similar to: content_tag question

Displaying 20 results from an estimated 3000 matches similar to: "content_tag question"

2005 Dec 25
5
RJS not working?
I''ve been attempting to add a simple rjs ''delete'' method to my project. However, no matter what I try, it simply doesn''t work. Even the easy, easy stuff seems broken. (Yes, <%= javascript_include_tag :defaults %> is being included in the template.) For example, from: http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates VIEW: <h1
2006 Apr 11
1
content_tag can not work?
the tag helper "content_tag" can not work correnctedly on my enviroment: page.insert_html :bottom, ''body'', content_tag("div","id"=>"tag") then in body,i can only get "idtag" as the text! but if i use : content_tag("p","hello world") I can get it worked. From the rails 1.1 api document,i can find the
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates. Rails doesn''t seem to find them. I did issue the rake comment update_javascripts and that did not correct the problem. RJS is part of 1.1 right? Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Jul 03
6
Rjs $("aaa").insertHtml is not a function error
Hi, I''ve searched the list and found that someone had the same problem as me http://lists.rubyonrails.org/pipermail/rails/2006-May/043760.html I''m have in my page a link like this <%= link_to_remote ("Add #{image_tag(''add.png'')}",:url=>{:action=>''addProduct''})%> and in my controller def addProduct ..................
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I did: create table categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote
2006 Mar 13
2
How to apply an effect to a link_to_remote :update without using evaluate_remote_response?
Hey all, I''ve been trying to apply a slide-down (or highlight) effect to a "New card" link on my application. Because the item is *new* and I''m simply updating it at the top, I can''t know what the div id is before I make the request. link_to_remote :complete => visual_effect(:slidedown) doesn''t do what I want it to do. My current solution is:
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item to fade and then get removed. So I do the following: 1. home_controller: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end 2. delete.rjs: if @element_id page.visual_effect :fade, @element_id
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end (For the purpose of this exercise, category names are unique) I have the corresponding delete.rjs file: if @element_id page.remove :id => @element_id page.visual_effect :highlight,
2006 May 20
1
RJS returned javascript written straight to page
hi there, I have in my controller, the following to catch a link_to_remote: def form_part_add_personnel @credit_types = CreditType.find(:all) p = Credit.new() p.id = rand.to_s[2..-1] render :update do |page| page.insert_html :bottom, "script", :partial => ''films/form/personnel'',
2006 Jan 12
5
Question about using DISTINCT in ActiveRecord find method.
Hi, Am relatively new to the RoR world. My question is quite simple. I have a query like such: shipmentNumbers = Order.find_by_sql(["select distinct s.id from orders o, line_items li, shipment_lines sl, shipments s where o.number=? and o.id = li.order_id and li.id = sl.line_item_id and sl.shipment_id = s.id", number]) The above query works fine. I wanted to do the same query using
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list that is having content added to it like this: http://rafb.net/paste/results/Z3m32g48.html ... where "my_list" would be an UL and the partial would insert a LI. Given that example, is there an easy way to highlight only the newly inserted LI instead of the whole UL? The only way I can see to do it is to give
2006 Apr 30
0
Using a DIV or SPAN for a content_tag (link_to_remote)
I was wondering if there was an easy way to over ride the <a> tag that is used as the content_tag() value when using link_to_remote(), perhaps using a SPAN or DIV. I see follow the chain in the source code and I guess I could write my own helper, but I was wondering if there was a way to do this already? I know already that SPAN''s and DIV''s are not supported
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get no results? Where am I going wrong? Thanks. -----------BEGIN SCRIPT---------------- require ''rubygems'' require ''ferret'' include Ferret path = ''/tmp/myindex'' field_infos = Ferret::Index::FieldInfos.new() field_infos.add_field(:name, :store => :yes, :index => :yes)
2007 Jan 24
1
Removing empty class attribute from @template.content_tag
Hey all, I have a quick question regarding the @template.content_tag methos when creating a custom form builder. Currently have the following method in my AccessibleBuilder class: def datetime_select(field, options = {}) required = options.delete :required label = options.delete :label @template.content_tag("div", @template.content_tag( "span", Example Label ) +
2006 Jun 08
3
RJS wierdness - Content div display js code
Hi, I have a link_to_remote name ''Show notes'', which calls an action that uses this RJS template: page.replace "notes_remote", :partial => "notes/hide_notes_link" page.insert_html :top, "notes_list", :template => "notes/list" page.visual_effect :highlight, ''notes_list'', :duration => 3 Works great. The
2006 Jan 31
4
RoR production app does not refresh
Hi, We have a RoR app deployed using Apache + fastcgi in production mode. When we make a change to say a controller filie on the server and go back to that page that executes that controller action it takes no effect. Does Rails cache pages and if so how does one force the new page to be used? Thanks,
2006 Jan 18
7
FastCgi issue
Hi, I know that Apache2 + fastcgi is sometimes difficult to setup, but I was wondering if anyone has come across this error and if yes what did you do to resolve it? [Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115] FastCGI: comm with server "/var/htdocs/ot/public/dispatch.fcgi" aborted: idle timeout (120 sec) [Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115]
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my form page. Here''s my page: <div id="posts"> <ul id="post_list"><%= render :partial => ''list_results'', :collection => @posts %></ul> <p><%= link_to_remote(''+'', :url => {:action =>
2006 Jan 24
3
Is there a concise way?
Hi, Is there a concise/ruby way to do the following: [Note: 1 and 2 below are not related.] (1) for p in 0...@order.line_items[k].shipment_lines.length shipline_qty = shipline_qty + @order.line_items[k].shipment_lines[p].quantity end (2) ts = Array.new for tk in s.trackings ts.push(tk) end
2006 May 30
4
Hide parent element
I have some code that calls a partial to display one or more blocks within a div tag. I want to have a close button (or cancel link) that will fade that block but leave the others. Here is the code: LINK: <%= link_to_remote "Add Miscellaneous Link", :url => { :action => :add_iyc_link } %> add_iyc_link.rjs: page.insert_html :bottom, ''links'', :partial