similar to: Re: Rails Digest, Vol 19, Issue 216

Displaying 20 results from an estimated 20000 matches similar to: "Re: Rails Digest, Vol 19, Issue 216"

2006 Apr 07
1
Re: page.replace_html "#{var_containing_id_name}",:partial
On 4/7/06, Chris Hall <christopher.k.hall@gmail.com> wrote: > page.replace @user.id, :partial => "edit_form" Thanks a lot Chris. -- Unfortunately, it didn''t quite work when I tried it that way. However, when I tried it this way: page.replace_html "#{@user.id}", :partial => "edit_form" It worked! Thanks again!! : ) Jason
2006 Apr 07
2
Re: Re: page.replace_html "#{var_containing_id_name}", :partial
> you mean like this? > > def do_some_ajax_thing > <at> element_id = "content_div" > end > > do_some_ajax_thing.rjs > > page.replace_html <at> element_id, :partial => "edit" > > remember, the view templates have access to the attributes defined > in the controller Actually, its more like this: I have a list page. Each row
2006 Apr 07
2
Re: page.replace_html "#{var_containing_id_name}", :partial
Jeff Coleman <progressions@...> writes: > > Jason Tuttle wrote: > > The subject line says it all. -- Is there a way to do something like: > > > > page.replace_html "#{var_containing_id_name}", :partial => ''edit'' > > > > That line of code does not work, but I would like to pass the name of > > a variable to
2006 Apr 07
2
page.replace_html "#{var_containing_id_name}", :partial => ''edit''
The subject line says it all. -- Is there a way to do something like: page.replace_html "#{var_containing_id_name}", :partial => ''edit'' That line of code does not work, but I would like to pass the name of a variable to page.replace_html. This variable would contain the id of the div I want to update. Anyone know if/how I could do that? Thanks! : ) Jason
2005 Dec 13
2
Ajax.Request onComplete
Hello, I have a small class where i want to use attributes of the instance when an ajax call returns, so I wrote: *var* MyClass = Class.create(); MyClass.prototype = { initialize: *function*(form_id, rendered_id) { this.form_id = form_id; *var* edit_form = $(form_id); *var* rendered_node = $(rendered_id); *if* (!edit_form || !rendered_node) { this.enabled = *false*;
2006 Apr 04
1
Re: Rails Digest, Vol 19, Issue 102
Thank you Alain, I am not at all opposed to hiding one link and displaying the other ( I assume you mean having a div container for each and setting the appropriate style ) Unfortunately, the problem remains for me that I still do not know how to modify those style attributes from the action that gets called via the first link, I still have not had any success doing a page.replace_html, or know
2006 Apr 18
3
Join Queries? - find() or find_by_sql()
Hi All, Is there a way to do join queries with find() or is it best to use find_by_sql() instead? I''m looking to do something like: SELECT winery_name, wine_name FROM winery, wine WHERE wine.winery_id = winery.winery_id AND winery.winery_name LIKE ''Borg%''; Thanks! : ) Jason
2006 Feb 08
2
What page is an item on?
Using the paginator helper, is there a way to determine what page an item in the collection is on? Thanks in advance for your help!
2006 Jul 03
2
rjs renders string or partial but not template or action
Hi, I have an rjs file. I only have one controller called called front. I have views called "new_title.rhtml" and "_new_title.rhtml" These work page.replace_html ''title'', ''new title'' page.replace_html ''title'', :partial => ''new_title'' page.replace_html ''title'',
2006 Aug 01
2
Active Merchant or Payment module?
Which do you guys prefer for credit card processing? Both look like they get the job done. -- Is there any consensus on which one is better? Are there other credit card processing solutions I''m not aware of? Any thoughts or suggestions would be most welcome. Thanks! : ) Jason -- Posted via http://www.ruby-forum.com/.
2007 Aug 20
0
FormBuilder in rjs
I have a page, which renders a partial that contains a ''State'' drop down list. Upon change, it re-renders the ''City'' drop down, re- populating it based on selected state_id: Page: /customer/new.rhtml <% form_for :customer, :url => customers_path do |f| %> State: <%= f.collection_select :state_id, State.find(:all), ''id'',
2008 Oct 29
0
RJS problem after upgrading to Rails 2.0.2
I just updated an old app from 1.2.6 to 2.0.2 and I''m having an rjs problem. I have one page that has 2 submit to remote buttons, one to do a price override and the other to remove the lineitem. Everything is working perfectly before the update but now the price override doesn''t update the page. I''ve verified that the price_override method still gets called because
2006 Apr 07
1
Validate_presence_of error in nested object is not displayed
Hi, I have a contact object . This contact has a address object >>Contact class Contact < ActiveRecord::Base has_one :address validates_presence_of :first_name ,:last_name end .>>> Address class Address < ActiveRecord::Base belongs_to :contact validates_presence_of :address end Addres has the following fields ; address, phone, fax, email In the contacts_controller I
2006 Mar 08
0
Re: Rails Digest, Vol 18, Issue 216
> Message: 3 > Date: 8 Mar 2006 22:31:16 -0000 > From: Mikkel Bruun <devlists-rubyonrails@devlists.com> > Subject: Re: [Rails] Caching model metadata? > To: rails@lists.rubyonrails.org > Message-ID: <20060308223116.19964.qmail@devlists.com> > Content-Type: text/plain; charset=utf-8 > > active record should cache the data when running in production...it >
2005 Feb 15
0
Re: Asterisk-Users Digest, Vol 7, Issue 216
asterisk-users-request@lists.digium.com is believed to have said: >Hey Everyone, > >I downloaded and installed the X-Lite softphone the other day (the lite >version) and cannot seem to get it to work well. > >Don't get me wrong, it registers with my asterisk server and everything >seems to work well, except the call quality really is horrible. > >I thought it may
2005 Mar 25
0
Re: Asterisk-Users Digest, Vol 8, Issue 216
>> >> >>Can I program a specific C.O. line directly to a button? >> >> Adopting the Critchfield style for a moment, no, *you* probably can't. But, depending on one's expertise with the hardware and Asterisk, it can certainly be done. I am by no means an Asterisk expert but have about 35 years of random phone experience. I have an ancient Siemens HiNet
2006 Jul 21
1
RJS Failing
This code was working before I created the update_link_list method in the helper below (everything was in 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
2006 Apr 05
9
Is eval the only way?
Hi, I''m trying to write some methods which use a parameter to represent a Class name. A very simplistic example: def foo(class_name, conditions) x = class_name.find(:all, :conditions => "#{conditions}") end Unfortunately, this does not work. The only way around this problem that I can think of is to use eval: def foo(class_name, conditions) x = eval
2006 Jul 24
2
BIG JS limit? Using replace_html with partials containing JS
Hello, It''s pretty hard giving a practical example on this one. I have a partial which contains some generated Javascript. Something like: order_screen.rhtml ------------------------------------------- <h1>Order</h1> <div id="order_part"> <%=render :partial=>''order_new'' %> </div> <h1>Ordered products</h1>
2006 May 28
0
expanding details examples?
I''m currently using page.visual_effect :toggle_appear to toggle the appearance of details associated with an order. As I am inserting the detail data prior to making it visible, this method is not appropriate (it also loads the data on hide). I was thinking I could change the hide/show href each time it is clicked, or even store a value on the page and toggle it each time