search for: gothamcitymacs

Displaying 13 results from an estimated 13 matches for "gothamcitymacs".

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 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 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/.
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
2006 Apr 07
0
Re: Rails Digest, Vol 19, Issue 216
...uot; 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 Gotham City Macs Phone: 212.253.1957 www.gothamcitymacs.com
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: 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 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 12
2
Can''t get observe_field to take a variable for a field name
The subject pretty much says it all: I can''t?get observe_field to take a variable for a field name I''ve tried: <%= observe_field(var_name, ... <%= observe_field("#{var_name}", ... <%= observe_field(:"#{var_name}", ... No luck. Am I missing something? Thanks, : ) Jason -- Posted via http://www.ruby-forum.com/.
2006 Jul 20
0
page.replace_html = Safar scrollbar bug?
If I replace the content of a div with new content which is too tall for the browser window, I get a scrollbar on the right. -- So far so good. But... If I then replace the content with content which DOES fit inside the browser window, Safari doesn''t remove the scrollbar! If I then resize the window ever so slightly, the scrollbar disappears. -- It ONLY happens in Safari. Has
2006 Apr 17
3
How To Remove Unnecessary Controllers?
Hi All, I''ve got some controllers in my project which I no longer need. -- They were generated by scaffolding. Is there an easy way to remove them? -- I.E. via the command-line. If not, is there a way to do it manually? Thanks! : ) Jason
2006 May 09
7
When to use optimistic locking?
Hi All, I''m having some trouble deciding when and how to implement optimistic locking. Let''s say I have a multiuser Rails app, and let''s say it stores, among other things "vital" customer information. The standard methods created by the Rails generate scaffold script look like this: def edit @customer = Customer.find(params[:id]) end