[Rails] how would you know how to call this rails method (select_all) this starting point of it's Rails API description?

2008-10-12 Thread Greg Hauptmann
Hi, I'm curious. If you saw the Rails select_all(sql, name = nil) method (rerfer http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#M001060), and wanted to use it, how would you really know how to use it and call it from this API doco? I know from

[Rails] utf-8 encoding in URL params

2008-10-12 Thread Joe
Hi, I'm accessing a web service API. This API is somehow like convert input string to a graph. this API has a text params. In the specification, this params should be UTF-8 encoded. what shall I do to ensure of this? or just pass the string to it? The reason I'm asking is, when I pass some

[Rails] Re-using crontrollers with non-http requests

2008-10-12 Thread Julien Genestoux
Hi! I am creating a application that does a lot of background processing. For this I am using a queue (starling in my case...) and several pollers that will get a message from the queue and execute some code corresponding do it. The code that these pollers process looks a lot like some code in

[Rails] Re: paperclip - deleting a photo from a form

2008-10-12 Thread bingo bob
For reference, here's the edit view for an advert, as I say, I'm trying to integrate a fiunction that allows users to delete one of the photos (1 to 6), any clues as to what i might do in this form / controller. h1Editing advert/h1 div id=advert_images %= render :partial = images, :locals

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-12 Thread Andi Geheim
Hi Freddy I am operating under ISPConfig, this is my Vhost File: -- NameVirtualHost xx.xx.xx.xx:80 VirtualHost xx.xx.xx.xx:80 ServerName localhost ServerAdmin [EMAIL PROTECTED] DocumentRoot /var/www/sharedip IfModule

[Rails] Re: how would you know how to call this rails method (select_all) this starting point of it's Rails API description?

2008-10-12 Thread Frederick Cheung
On Oct 12, 7:09 am, Greg Hauptmann [EMAIL PROTECTED] wrote: Hi, I'm curious.   If you saw the Rails select_all(sql, name = nil) method (rerferhttp://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Da...), and wanted to use it, how would you really know how to use it and call it

[Rails] Re: false is not true failure in unit test

2008-10-12 Thread Jay Pangmi
Frederick Cheung wrote: Assuming the failure is on the last assertion it's probably because you've never set family_rate, but your validation asserts that it is greater than 0.01. You could stick a breakpoint before the test fails and poke around to see exactly why the object is not valid

[Rails] Re: session question..

2008-10-12 Thread Jay Pangmi
Jay Pangmi wrote: Ok, Now as I've made session[:cart_ids] and array with: session[:cart_ids] ||= [] how can I clear all the stored ids in the session coz 'session[:cart_ids] = nil' isn't working. Also as I have ids in the array referenced by session[:cart_ids] and that the carts table

[Rails] Re: Future of Ruby as well as Rails

2008-10-12 Thread Oldtimer
hi, I expect a clear answer . first - i understand the reaction of Codeblogger... totally... ;-) second - i (also totally) agree with Bobnation and especially with Helio Rocha Why I am asking this is in India the big corporates using rails is very few atleast for now .dont know what

[Rails] Re: false is not true failure in unit test

2008-10-12 Thread Frederick Cheung
Sent from my iPhone On 12 Oct 2008, at 12:35, Jay Pangmi [EMAIL PROTECTED] s.net wrote: Frederick Cheung wrote: Adding an extra test isn't going to help. Your test isn't passing because your object is not valid Fred Where am I wrong? Here's how I've done... Print out the object's

[Rails] Re: false is not true failure in unit test

2008-10-12 Thread Frederick Cheung
Sent from my iPhone On 12 Oct 2008, at 11:29, Jay Pangmi [EMAIL PROTECTED] s.net wrote: Frederick Cheung wrote: Assuming the failure is on the last assertion it's probably because you've never set family_rate, but your validation asserts that it is greater than 0.01. You could stick a

[Rails] Re: ActiveScaffold :form_ui select

2008-10-12 Thread Aaa Eee
I am need to do something exactly like this too. Any solutions out there. My basic Rails/Ruby knowledge is not getting me anywhere. Help very much appreciated. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because

[Rails] Re: false is not true failure in unit test

2008-10-12 Thread Jay Pangmi
Frederick Cheung wrote: Print out the object's errors and you'll see Fred sorry how do i do that? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] How to build search form dynamically

2008-10-12 Thread ror.man83
Hi all, I want to search events based on its name, location, start date, end date and ... if i am using sql, i can do this sql= select * from events where 1=1 if params[:name] sql += name = #{params[:name]} if params[:location] sql += location = #{params[:location]} Are there other ways to

[Rails] Re: false is not true failure in unit test

2008-10-12 Thread Frederick Cheung
Sent from my iPhone On 12 Oct 2008, at 13:13, Jay Pangmi [EMAIL PROTECTED] s.net wrote: Frederick Cheung wrote: Print out the object's errors and you'll see Fred sorry how do i do that? Look at foo.errors Something like puts foo.errors.inspect should do the trick. Or stick debugger

[Rails] How to test with RSpec a Rails plugin using “link_to” and “current_page?”

2008-10-12 Thread Christian Lescuyer
I'm writing a Rails plugin that builds up a menu in a view. I'm using *link`_`to* to build the link and *current_page?* to set class=active on the current page. I've *include*d *ActionView::Helpers::UrlHelper* so I can use *link`_`to*. To get *current`_`page?* working in the view, I've had to

[Rails] newbie help

2008-10-12 Thread Stefano Bonomi
Hi, I have a view, where I need to display some text and then after 5 seconds, redirect to an action automatically (sending one parameter too). Googling I've found only solutions for PHP and others, nothing for Ruby on Rails. How can I do in ROR ? Many thanks in advance -- Posted via

[Rails] Single Rails App - Several Subdomains

2008-10-12 Thread gamehack
Hi all, I am in a situation that I have no idea how to approach. Basically, I've got a licensing app that is distributed across several domains, as in: admin.example.com licenses.example.com secure.example.com paypal.example.com ... Ideally, I would like to be able to setup routing on a

[Rails] Re: Re-using crontrollers with non-http requests

2008-10-12 Thread Hassan Schroeder
On Sun, Oct 12, 2008 at 12:01 AM, Julien Genestoux [EMAIL PROTECTED] wrote: The code that these pollers process looks a lot like some code in methods included in some of my rails application controllers. I wanted to DRY this a little bit, so I tried to use the controllers method. I wanted

[Rails] Re: Single Rails App - Several Subdomains

2008-10-12 Thread Hassan Schroeder
On Sun, Oct 12, 2008 at 8:48 AM, gamehack [EMAIL PROTECTED] wrote: I've got a licensing app that is distributed across several domains, as in: admin.example.com licenses.example.com secure.example.com paypal.example.com Ideally, I would like to be able to setup routing on a subdomain

[Rails] Re: calling form_remote_tag in a helper

2008-10-12 Thread Garrett Berneche
That doesn't work. When you are in a helper instead of a view form_remote_tag cannot except a block because _erbout is out of scope. On Oct 11, 10:04 am, Maurício Linhares [EMAIL PROTECTED] wrote: It would be like this: % form_remote_tag :url = {:controller = stuf} do %         %=

[Rails] Multipart email, how to bypass the bug?

2008-10-12 Thread Xdmx Xdmx
Hi, i've to send a mail in the multipart format, but it became a mess because of a 2 years old bug. It change stuff like style=... to style=3D so the clients doesn't render the mail good. I've open a bug report at

[Rails] Re: Single Rails App - Several Subdomains

2008-10-12 Thread gamehack
On Oct 12, 5:14 pm, Hassan Schroeder [EMAIL PROTECTED] wrote: On Sun, Oct 12, 2008 at 8:48 AM, gamehack [EMAIL PROTECTED] wrote: I've got a licensing app that is distributed across several domains, as in: admin.example.com licenses.example.com secure.example.com paypal.example.com

[Rails] Re: Memory Leak

2008-10-12 Thread tonypm
Thanks Fred, Fedora updated Ruby to: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] problems now all gone away - much relieved!! Tonypm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: to understand the flow of application in ror

2008-10-12 Thread yachtman
If I understand your question correctly... Routing seems to be the core of you are asking. In the case of the form, when you click 'submit', it's a POST action, which when combined with your controller will be directed to the 'create' action. When you first asked for the form 'edit' or 'new',

[Rails] Re: newbie help

2008-10-12 Thread Hassan Schroeder
On Sun, Oct 12, 2008 at 8:02 AM, Stefano Bonomi [EMAIL PROTECTED] wrote: I have a view, where I need to display some text and then after 5 seconds, redirect to an action automatically (sending one parameter too). Since this is client-side behavior, it has nothing to do with PHP, RoR or any

[Rails] Re: newbie help

2008-10-12 Thread Stefano Bonomi
Hassan Schroeder wrote: On Sun, Oct 12, 2008 at 8:02 AM, Stefano Bonomi [EMAIL PROTECTED] wrote: Since this is client-side behavior, it has nothing to do with PHP, RoR or any other platform. You can do this using either JavaScript or a META tag. For the latter, put something like this in

[Rails] Re: Multipart email, how to bypass the bug?

2008-10-12 Thread Frederick Cheung
On 12 Oct 2008, at 17:31, Xdmx Xdmx wrote: Hi, i've to send a mail in the multipart format, but it became a mess because of a 2 years old bug. It change stuff like style=... to style=3D so the clients doesn't render the mail good. I've open a bug report at

[Rails] Re: Single Rails App - Several Subdomains

2008-10-12 Thread Hassan Schroeder
On Sun, Oct 12, 2008 at 9:41 AM, gamehack [EMAIL PROTECTED] wrote: If you do need them all serviced by one app, fronting it with Apache httpd with mod_rewrite would probably take care of it. I'd still consider whether multiple loosely coupled apps would be suitable, even desirable -- but in

[Rails] Re: calling form_remote_tag in a helper

2008-10-12 Thread Frederick Cheung
On 11 Oct 2008, at 13:47, Garrett Berneche wrote: Apparently inside a helper form_remote_tag cannot take a block because _erbout is out of scope. As of a year ago the accepted way to handle this was to call form_remote_tag without a block, like this; form_remote_tag(:url = { :controller

[Rails] Re: newbie help

2008-10-12 Thread Ing. Mario Navarra
Hi! (Ciao), I do something like what you want with ajax components. I've used an observer... now i've not the code, but if you write to me I can send it bye, Mario On 12 Ott, 17:02, Stefano Bonomi [EMAIL PROTECTED] wrote: Hi, I have a view, where I need to display some text and then after 5

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-12 Thread Andi Geheim
aaah okay know I know: - VirtualHost xx.xx.xx.xx:80 IfModule mod_proxy_balancer.c Proxy balancer://aekschencluster BalancerMember http://xx.xx.xx.xx:82 /Proxy Location /de/ ProxyPass balancer://aekschencluster/

[Rails] Change link_to routing http://domain.tdl/static/application

2008-10-12 Thread Andi Geheim
Hi I have a mongrel proxy that listen on that url: http://www.domain.tdl/blaa/main/index. The 'blaa' is a static link that activates the proxy. How can I change the rails routing, that every link directs to http://www.domain.tdl/blaa/.../index and not like it is at the moment to

[Rails] Re: profile importer

2008-10-12 Thread [EMAIL PROTECTED]
Please let me know if you know anything on tihs.. On Oct 12, 12:22 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Any suggestions?? On Oct 11, 11:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am working on the social networking application in Rails where I have to give

[Rails] Internal server error after editing environment.rb

2008-10-12 Thread Tom Eustace
Hi all, this is hopefully a quick one for gurus. I edited my environment.rb file, commenting out these lines: config.action_controller.session = { :session_key = '_test_session', :secret = 'long key here' } When I browsed to my app, I got the internal server error, I

[Rails] Re: Internal server error after editing environment.rb

2008-10-12 Thread Frederick Cheung
Check your log files. the internal server error could be any number of things,from a syntax error to a misconfiguration Your authentication token problems could be because when if you make a request to a different subdomain than the one that created the form it probably isn't sending the

[Rails] Re: Change link_to routing http://domain.tdl/static/application

2008-10-12 Thread Andi Geheim
okay is not nessesary anymore, i found an other way ;) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-12 Thread Andi Geheim
okay I found an other solution. I did it the other way around: ProxyPass /phpBB3 ! ProxyPass / balancer://aekschencluster/ stickysession=JSESSIONID I set the phpBB3 Forum as an exception. greetings -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Multipart email, how to bypass the bug?

2008-10-12 Thread Xdmx Xdmx
Frederick Cheung wrote: I've got multipart html emails that work just fine. What are you doing in your mailer ? Fred Nothing special. This is the code: *** notifications.rb: def alert @sent_on = Time.now @from = '[EMAIL PROTECTED]' @recipients = '[EMAIL

[Rails] Re: Plugin Installation Help

2008-10-12 Thread Jaus LXXIV
So I downloaded two different versions of the svn client and I still can't install the plugin. This is getting kind of annoying because I was able to install auto_complete with no problem. Also, I'm going to have to get this rails code running on my employer's computer and I don't really want to

[Rails] Re: Multipart email, how to bypass the bug?

2008-10-12 Thread Frederick Cheung
On 12 Oct 2008, at 20:33, Xdmx Xdmx wrote: As you can see is: div style=3D\color:red\test/div It adds that 3D (ascii: '=') and that cause the wrong rendering on a lot of email clients :( Isn't that normal? Give that the encoding is quoted printable, = signs have to be escaped. It

[Rails] Re: Multipart email, how to bypass the bug?

2008-10-12 Thread Xdmx Xdmx
Frederick Cheung wrote: On 12 Oct 2008, at 20:33, Xdmx Xdmx wrote: Isn't that normal? Give that the encoding is quoted printable, = signs have to be escaped. It does that with the mails I send and it does not cause a problem. My emails do however contain a full html document (ie with a

[Rails] Re: Plugin Installation Help

2008-10-12 Thread Frederick Cheung
On Oct 12, 8:30 pm, Jaus LXXIV [EMAIL PROTECTED] wrote: So I downloaded two different versions of the svn client and I still can't install the plugin. This is getting kind of annoying because I was able to install auto_complete with no problem. Also, I'm going to have to get this rails code

[Rails] Re: how would you know how to call this rails method (select_all) this starting point of it's Rails API description?

2008-10-12 Thread Greg Hauptmann
how is it obvious to your Frederick can I ask - how would you know these methods will end up where they do - I'm guessing (but might be wrong) you would have to look through Rails code to find out how it uses/mixes in the methods as the framework instantiates itself. If I'm correct here this

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-12 Thread Freddy Andersen
Depends on the rails backed but if you are using mongrel or thin you can setup a prefix for the app... setup a prefix of /app and then in the balancer you use ProxyPass / balancer://cluster/app --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Copying attachment_fu file uploads

2008-10-12 Thread Bill Harding
Faster version here: http://www.williambharding.com/blog/rails/rails-faster-clonecopy-of-attachment_fu-images/ Bill Harding wrote: Thanks for posting this! I added this in, with Rick's suggested modifications, and it seems to do exactly what we were looking for. Saved me about a day of

[Rails] Re: Determining which controller to write the code into!

2008-10-12 Thread Chirantan
Thanks Nick. It helped. I went with the same approach. Thank you for your clarification. Chirantan On Oct 10, 6:30 pm, Nick [EMAIL PROTECTED] wrote: On Oct 10, 5:34 am, Chirantan [EMAIL PROTECTED] wrote: This question is more about how things work in an MVC architecture based ORM

[Rails] Re: a small doublt

2008-10-12 Thread Pokkai Dokkai
Thanks for all your reply now i understand. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] list of features to be concluded for create a Rails Demo ?

2008-10-12 Thread Pokkai Dokkai
hey all, i need to create a good attractive Rails-2.1.1 Demo presentation(with the full working flow) what are the main features should be concluded in presentation ? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: use of custom routings

2008-10-12 Thread Pokkai Dokkai
Frederick Cheung wrote: On 8 Oct 2008, at 14:56, Pokkai Dokkai wrote: http://guides.rails.info/routing/routing_outside_in.html#_restful_routing_the_rails_default nice explaination thanks Cheung. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] HABTM CheckBoxes

2008-10-12 Thread Davo
I'm trying to achieve something that I assume is fairly common? I have a Category table and a Brand Table. When I create a new Category I want a list of checkboxes to appear, and when checked they update the category_brand table. Here are the models. class Category ActiveRecord::Base

[Rails] Re: use of custom routings

2008-10-12 Thread Pokkai Dokkai
Frederick Cheung wrote: On 8 Oct 2008, at 14:56, Pokkai Dokkai wrote: what is the main use of http://guides.rails.info/routing/routing_outside_in.html#_restful_routing_the_rails_default i have confused a little about perfomance issue while using nested routing if i create a nested routes

[Rails] Re: HABTM CheckBoxes

2008-10-12 Thread Pokkai Dokkai
Pokkai Dokkai wrote: Davo wrote: @category.brands = brand.find(@params[:categories][:brand_ids]) if @params[:categories][:brand_ids] check this -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: HABTM CheckBoxes

2008-10-12 Thread Davo
All working, no code required in controller ( other than code mentioned in RailsCasts HABTM http://railscasts.com/episodes/17-habtm-checkboxes ) I had the naming wrong for the brands_categories table ! cheers, Dave On Oct 13, 1:28 pm, Pokkai Dokkai [EMAIL PROTECTED] wrote: Pokkai Dokkai