[Rails] Re: Routing every request to same action

2009-03-31 Thread Umair Ejaz
Thanks dear this will work fine if I write before_filter :route_all_to_somewhere in start of my all controllers but if the controller doesnt exist, means he write locahost:3000/rac and there is not 'rac' controller then how can I redirect this request towards my desired action...It willl

[Rails] Routing error in nested resources

2009-03-31 Thread Carlos Santana
I am using nested resources as follows: map.resources :topics do |topics| topics.resources :items do |items| items.resources :attachments end end When I generate a RESTful path for new item in the console: app.new_topic_item_path(2) then I get correct path as

[Rails] Re: Routing error in nested resources

2009-03-31 Thread Carlos Santana
Carlos Santana wrote: I am using nested resources as follows: map.resources :topics do |topics| topics.resources :items do |items| items.resources :attachments end end When I generate a RESTful path for new item in the console: app.new_topic_item_path(2) then I get

[Rails] Re: Failsafe errors since upgrading to 2.3

2009-03-31 Thread Andrew
Hi everyone, posting to let you know that I discovered that this error pops up every time I go to /session. Though I'm not sure how the error could occur all the time unless people go to straight to mysite.com/ session or something. Logging in works for me (and everyone else as far as I can

[Rails] Workling - Queue List

2009-03-31 Thread Manuel
Hi there, I'm working on a Conversion Machine for Videos. I use workling and starling. My problem is that I can't find a way to show me how many jobs I have in each worker queue and maybe the possiblity to delete a job from that list. I tried it with the MemCache stats, searched the web etc

[Rails] Lister fichiers/répertoires sur serveur

2009-03-31 Thread Babiben Aaa
Salut, Je voudrais savoir comment peut-on lister les fichiers et répertoires en ruby. J'aimerais pouvoir lister les répertoires existants pour créer une liste déroulante avec ces derniers. Est ce que c'est techniquement possible ? Merci BOnne journée -- Posted via http://www.ruby-forum.com/.

[Rails] Debugging Cookie Behavior

2009-03-31 Thread Daniel Liebig
Hi All, this is getting desperate... I have a rails applcation setting a cookie like cookies[:foo] = 'bar' At my local development system (Mac 10.5.6, Ruby 1.8.6, Rails 2.2.2) mongrel (how do i find out the mongrel version, btw.?) sets this cookie both on development and production

[Rails] Re: How to restart an app under Passenger

2009-03-31 Thread Colin Law
2009/3/22 Colin Law clan...@googlemail.com 2009/3/22 Greg Donald gdon...@gmail.com On Sat, Mar 21, 2009 at 11:02 PM, avramd dorf...@est.org wrote: However I can't figure out how to trigger Passenger to realize that I've changed my code. Any ideas? touch tmp/restart.txt On my

[Rails] Re: How to restart an app under Passenger

2009-03-31 Thread Bob Mundane
Avram Dorfman wrote: Just wanted to thank you both. Don't know why I was unable to find this answer anywhere else. Was just here : http://www.modrails.com/documentation/Users%20guide.html#_redeploying_restarting_the_ruby_on_rails_application -- Posted via http://www.ruby-forum.com/.

[Rails] Safari 4 invalid auth token

2009-03-31 Thread matthooks
Getting an odd error in Safari 4: Here's the auth token that's output to my javascript: 4HB8yAW4gU2xEavWOc+kiMoj4XIyCBUK/t704aOQ+co= Here's what's listed in the parameters: authenticity_token=4HB8yAW4gU2xEavWOc kiMoj4XIyCBUK/t704aOQ co= notice: the +'s are being replaced by spaces. This a

[Rails] ActiveRecord::StatementInvalid in new action on scaffolding

2009-03-31 Thread Darren VanBuren
I am trying to learn Rails by experimenting with it. Currently, I'm trying on my laptop running Windows 7 (build 7000), with Ruby 1.8.6, RubyGems 1.3.1, and Rails 2.3.2(.1). I of course had to get sqlite3-ruby installed, which I did. I just created some scaffolding with script/generate (which I

[Rails] Question: An application made with Ruby on Rails is Open Source by default?

2009-03-31 Thread Dorian
Hello everybody, I'm about to enter the Ruby on Rails Community after reading a lot of good feedback on the Internet and the Agile Programming book also. Before starting to develop my application I would like to clear one last thing (or doubt). I was told that using applications that are

[Rails] Re: About AR relationship

2009-03-31 Thread damianham
Performance. Lets, say you are listing a set of folders on a page and you want to display the number of files in each folder. So you would use something like %= folder.files.size() % With the classic foreign key relation then for every folder you will get an SQL query like select

[Rails] Re: How can I let rails working on non-block mode?

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:02 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: Hi, you should be able to configure the log_path by adding it to the initializer block in your environment.rb.  For example, Rails::Initializer.run do |config|   ...   # Note:  By default, the log_path is set to

[Rails] Re: Can RJS render new javascript?

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:12 am, dinoD dinodorr...@yahoo.com wrote: Thanks for the reply.  I'm writing the script code because i'm testing an example user of the widget, and it simply calls the website that generates the widget.  so is there some escaping type issue that would prevent directly rendering

[Rails] How can I change the rails default page?

2009-03-31 Thread Zhao Yi
I start rails server and the default(http://localhost:3000) page would be Ruby on Rails welcome page. Can I change this page or redirect to a controller? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Safari 4 invalid auth token

2009-03-31 Thread Conrad Taylor
On Mon, Mar 30, 2009 at 6:57 PM, matthooks mattho...@gmail.com wrote: Getting an odd error in Safari 4: Here's the auth token that's output to my javascript: 4HB8yAW4gU2xEavWOc+kiMoj4XIyCBUK/t704aOQ+co= Here's what's listed in the parameters: authenticity_token=4HB8yAW4gU2xEavWOc

[Rails] Internal mail system : model definition issue

2009-03-31 Thread Céd B .
Hi all, I try to implement an internal mail system to my rails app. I found this message [1] on another mailing list, but i need it to be a little different. So here's the case : i got a user table, a message table, and a communication table. This last one contains the message_id, the sender_id

[Rails] Re: Question: An application made with Ruby on Rails is Open Source by default?

2009-03-31 Thread Dorian Lupu
Thank you Fred for your quick answer. Looks like i'll start soon my application using RoR! Best Regards, Dorian 2009/3/31 Frederick Cheung frederick.che...@gmail.com On Mar 31, 8:53 am, Dorian dorian.l...@gmail.com wrote: Hello everybody, I'm about to enter the Ruby on Rails

[Rails] dynamic select menu

2009-03-31 Thread Shuaib85
Hi there I have seen railscasts episode 88 about dynamic select menus and I implemented it. However, it has some bugs, I managed to tackle some. But I saw a better way to do that using related select forms http://agilewebdevelopment.com/plugins/related_select_forms according to the readme

[Rails] Application without database.yml

2009-03-31 Thread Tushar Gandhi
Hi, I have created one application. In that application I am not using any database. Whenever I starting rails server it is giving me an error for configuration of database.yml. What should I do for this? Thanks, Tushar -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How can I change the rails default page?

2009-03-31 Thread derm_w
I'm new to rails myself but I think you'll find the welcome page in the index.html file in the public folder in your app. Kind regards, Dermot. On Mar 31, 9:57 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: I start rails server and the default(http://localhost:3000) page would be Ruby

[Rails] Re: How can I change the rails default page?

2009-03-31 Thread Conrad Taylor
On Tue, Mar 31, 2009 at 2:32 AM, derm_w dermotw...@eircom.net wrote: I'm new to rails myself but I think you'll find the welcome page in the index.html file in the public folder in your app. Kind regards, Dermot. On Mar 31, 9:57 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: I

[Rails] Re: Question: An application made with Ruby on Rails is Open Source by default?

2009-03-31 Thread Frederick Cheung
On Mar 31, 8:53 am, Dorian dorian.l...@gmail.com wrote: Hello everybody, I'm about to enter the Ruby on Rails Community after reading a lot of good feedback on the Internet and the Agile Programming book also. Before starting to develop my application I would like to clear one last thing

[Rails] Re: How can I change the rails default page?

2009-03-31 Thread Conrad Taylor
On Tue, Mar 31, 2009 at 1:57 AM, Zhao Yi rails-mailing-l...@andreas-s.netwrote: I start rails server and the default(http://localhost:3000) page would be Ruby on Rails welcome page. Can I change this page or redirect to a controller? Hi, you can add the following in your routes.rb file at

[Rails] Re: Question: An application made with Ruby on Rails is Open Source by default?

2009-03-31 Thread Frederick Cheung
On Mar 31, 10:29 am, Dorian Lupu dorian.l...@gmail.com wrote: Thank you Fred for your quick answer. Looks like i'll start soon my application using RoR! Also (and I am not a lawyer etc.) if what you've got is just a hosted service it wouldn't matter if you had to gpl your code because (at

[Rails] Re: Application without database.yml

2009-03-31 Thread Shuaib85
As far as I concern that rails runs with database.yml u can use sqlite3 and create an empty database which has no harm on your application On Mar 31, 11:31 am, Tushar Gandhi rails-mailing-l...@andreas-s.net wrote: Hi, I have created one application. In that application I am not using any

[Rails] Re: Question: An application made with Ruby on Rails is Open Source by default?

2009-03-31 Thread Fernando Perez
Dorian Lupu wrote: Thank you Fred for your quick answer. Looks like i'll start soon my application using RoR! However, if you use MySQL, make sure you fully understand their license if you want to distribute your app. I decided to use PostgreSQL just in case. -- Posted via

[Rails] Methode Controleur non prise en compte

2009-03-31 Thread Babiben Aaa
Bonjour, Je voudrais bien comprendre pourquoi si j'ajoute une méthode traiter dans mon controleur trucs_controller il ne l'a pas prend pas en compte si je l'intègre dans un lien. Par exemple, sur ma page index.erb.html, j'ai ajouté le lien = %= link_to 'Charger', :controller='trucs',

[Rails] Re: Application without database.yml

2009-03-31 Thread Tushar Gandhi
Shuaib Zahda wrote: As far as I concern that rails runs with database.yml u can use sqlite3 and create an empty database which has no harm on your application On Mar 31, 11:31�am, Tushar Gandhi rails-mailing-l...@andreas-s.net I agreed that there is no harm to create an empty

[Rails] Re: Methode Controleur non prise en compte

2009-03-31 Thread Fernando Perez
J'ai bien regénéré les routes à partir du menu run-routes ? Que faire ? Il faut plutôt poster dans la section Rails en français, ici c'est anglais. Il faut que tu édites routes.rb et ajoutes la nouvelle route. Le menu run=routes keseksa? Un IDE? Ca sert à rien! Fait les choses à la main tu

[Rails] Re: Application without database.yml

2009-03-31 Thread Fernando Perez
What should I do for this? Read environment.rb -- 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: Application without database.yml

2009-03-31 Thread Fernando Perez
I agreed that there is no harm to create an empty database. Is there no other way? That's lame to install the DB software, configure it, and leave it empty. Read environment.rb and tell your app to not load ActiveRecord. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How can I let rails working on non-block mode?

2009-03-31 Thread Zhao Yi
Siddick Ebramsha wrote: Use the -d option with the `ruby script/server` program. Then WEBrick server will run as a daemon. How can i stop the rails server if using -d option? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Routing every request to same action

2009-03-31 Thread Madhusudhan H r
If the requirement is to direct every incoming request for a particular action in a controller then can just have map.connect '*path', :controller=your_controller, :action=your_action in the routes.rb file. This will redirect every request to 'your_action' in 'your_controller'. Regards,

[Rails] Re: Database Migration error

2009-03-31 Thread Doel Sengupta
Colin Law wrote: Can you supply some more code please, assuming it is not hundreds of lines then show us the migration .rb contents. 2009/3/27 Doel Sengupta rails-mailing-l...@andreas-s.net I got it fixed by changing t.column to t.datatype in my model.rb file -- Posted via

[Rails] Re: Pariah?

2009-03-31 Thread Phlip
Danimal wrote: I must be lying down in the dirt then. My recent project has broken some really new ground for me: 1. ActionMailer emails with multiple formats AND multiple attachments 2. ActionMailer global layouts with over-ride for Plain emails etc. One thing that happens with Rails is

[Rails] Re: How can I let rails working on non-block mode?

2009-03-31 Thread Frederick Cheung
On Mar 31, 11:50 am, Zhao Yi rails-mailing-l...@andreas-s.net wrote: Siddick Ebramsha wrote: Use the -d option with the `ruby script/server` program. Then  WEBrick server will run as a daemon. How can i stop the rails server if using -d option? just kill it. grab the pid from ps (or

[Rails] Re: Not able to see the the controls and database entries

2009-03-31 Thread Frederick Cheung
On Mar 31, 12:52 pm, Abhisekh Jain rails-mailing-l...@andreas-s.net wrote: Hi am a newbie to RoR. I am starting RoR with Ruby on Rails For Dummies. And i am working on RadRails. I have executed the very first program Company project (with Employee module and Employee Scafold. I am using

[Rails] Not able to see the the controls and database entries

2009-03-31 Thread Abhisekh Jain
Hi am a newbie to RoR. I am starting RoR with Ruby on Rails For Dummies. And i am working on RadRails. I have executed the very first program Company project (with Employee module and Employee Scafold. I am using MYSQL. The number of records are getting incremented (ie inserted in DB) But in UI

[Rails] Re: Not able to see the the controls and database entries

2009-03-31 Thread Frederick Cheung
On Mar 31, 1:22 pm, Abhisekh Jain rails-mailing-l...@andreas-s.net wrote: Thanks Cheung for the reply. I am having the following versions: gem 1.3.1 rails 2.3.2 ruby 1.8.6 mysql 5.0.77 And the fact is after adding the employees record by clicking the Add button the records are inserted

[Rails] force Create on scaffold Save

2009-03-31 Thread Luciano
Hello there, I working on a form, but I would like to save a news version after the edit form, I changed my form_for to: %# form_for(@quote) do |f| % % form_for :quote, :url = { :action = create } do |f| % but it's no working, a possible reason is that I have some nested items on my form, but

[Rails] javascript encodeURIComponent equal code

2009-03-31 Thread Nanyang Zhan
Javascript's encodeURIComponent works differently from CGI.eacape or ERB::Util.u. for example: encodeURIComponent('中文') = '%D6%D0%CE%C4' but CGI.escape(中文) = %E4%B8%AD%E6%96%87 ERB::Util.u(中文) = %E4%B8%AD%E6%96%87 Is there any way to get the same encoded result with ruby code? -- Posted via

[Rails] Re: A problem about routing request

2009-03-31 Thread Nanyang Zhan
Zhao Yi wrote: You have a nil object when you didn't expect it! The error occurred while evaluating nil.to_sym 贴出错误信息全文好查一点. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: Pariah?

2009-03-31 Thread Danimal
Phlip, That is so true! And something I struggle with often. I'm much more a programmer than a web designer, but as I'm self-employed, it's often the build me a website projects that come my way, which tend to be 80% design / 20% programming. It's very hard to be self-employed (i.e. not part of

[Rails] Re: Database Migration error

2009-03-31 Thread Ar Chron
Doel Sengupta wrote: I got it fixed by changing t.column to t.datatype in my model.rb file You might have been mixing syntaxes: t.column :first_name, :string or t.string :first_name will work -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Frederick Cheung
On Mar 31, 2:06 pm, Nanyang Zhan rails-mailing-l...@andreas-s.net wrote: Javascript's encodeURIComponent works differently from CGI.eacape or ERB::Util.u. Well the difference is that the javascript stuff is produced UTF16 and the ruby UTF8 (although the documentation I can find suggests that

[Rails] Re: Pariah?

2009-03-31 Thread Ar Chron
Pariah? no... anathema maybe... ;) I hadn't replied 'cause I have no experience with ActionMailer, etc, but I read most everything (kind of a 'first thing at work while getting started' habit). But that doesn't mean you should stop posting. The resolution of your 'sticky wicket' may just

[Rails] Firebird adapter HELP???????

2009-03-31 Thread Rick Fiorentino
Hi All, Is anyone successfully using ROR 2.x with Firebird 2.x in a production environment? The support seems to have dwindled. I would greatly appreciate any installation guidelines, comments or tips. What is somewhat confusing is what is required to for ROR to play nicely with firebird. I

[Rails] Re: Pariah?

2009-03-31 Thread Danimal
On Mar 31, 7:41 am, Ar Chron rails-mailing-l...@andreas-s.net wrote: Pariah? no... anathema maybe... ;) :-D But that doesn't mean you should stop posting. The resolution of your 'sticky wicket' may just save me, or other folks, time and/or confusion in the future. Actually, this is a good

[Rails] TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?

2009-03-31 Thread Rick Schumeyer
My environment.rb contains config.time_zone = 'UTC' If my understanding is correct, rails should assume time values coming from the database are UTC, and since config.time_zone is set to 'UTC', it should not try to convert the times. Instead, rails is assuming that the db values are Eastern (my

[Rails] Re: Firebird adapter HELP???????

2009-03-31 Thread Fidel Viegas
On Tue, Mar 31, 2009 at 2:50 PM, Rick Fiorentino rails-mailing-l...@andreas-s.net wrote: Hi All, Is anyone successfully using ROR 2.x with Firebird 2.x in a production environment? The support seems to have dwindled. I would greatly appreciate any installation guidelines, comments or

[Rails] Handle Net::FTP connection timeout

2009-03-31 Thread Brian Zzzzzz
Hello, This may be more of a Ruby question but I'm using Ruby on Rails so I thought I would post it here. Hopefully someone can provide a suggestion on how to approach this. I have a method that uploads a selection of files via FTP. For each file the method gets the file's associated ftp

[Rails] Re: Accept POST data from external source?

2009-03-31 Thread Duane Morin
Perfect - the data I need ends up in request.env['RAW_POST_DATA']. Thanks! D David Knorr wrote: Duane Morin skrev: Anybody got suggestions on how to get around this? Do I have to work with the folks generating the XML to do some sort of handshake that gets them an authenticity token? But

[Rails] Re: Firebird adapter HELP???????

2009-03-31 Thread Fidel Viegas
On Tue, Mar 31, 2009 at 3:12 PM, Fidel Viegas fidel.vie...@gmail.com wrote: That's it, you can now follow the rest of the tutorial from http://mapopa.blogspot.com/2009/02/installing-firebird-active-record-for.html Sorry, wrong link. Here is the correct one

[Rails] Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Tom Ha
Hi, can anyone tell me : a) IF ARMailer works in Rails 2.3, and b) HOW to make it work? (Anything special to do or to think about?) - I have recently upgraded to Rails 2.3 and ARMailer stopped saving the emails to the database table (they show up in the log though). I guess I should have

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Sean McGilvray
The branch from http://www.github.com/adzap works in 2.3. Sean McGilvray Executive Director Identity Theft Specialist Pre-Paid Legal Service's, Inc. NYSE:PPD Phone: 760-486-1019 smcgilv...@prepaidlegal.com http://www.transferhome.net On Tue, Mar 31, 2009 at 7:25 AM, Tom Ha

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Sean McGilvray
It is not the Rails version that is the problem. It is the upgrade to Ruby 1.8.7 or higher that is causing the problem. If you us the http://www.github.com/adzap branch you will be able to get up and running. Sean McGilvray Executive Director Identity Theft Specialist Pre-Paid Legal Service's,

[Rails] Re: Handle Net::FTP connection timeout

2009-03-31 Thread Danimal
Hi Brian! I don't know about Net::FTP, but as a suggestion: what if you spawned a separate thread right before you open the connection and that thread does a: sleep(30) then checks the FTP connection and forces it to close if need be. Of course, if there isn't a way to check the connection

[Rails] developer position available, Nashville TN

2009-03-31 Thread Greg Donald
Nashville, TN The Center for Human Genetics Research at Vanderbilt University Medical Center is looking to hire a new developer. https://www5.recruitingcenter.net/Clients/vanderbiltjobs/PublicJobs/controller.cfm?jbaction=JobProfileJob_Id=11810esid=az No telecommute, on-site only. -- Greg

[Rails] new to RoR..need help with the error in my code

2009-03-31 Thread Laksh Madab
hello, I am a new RoR developer and am struck with some errors in the code..i am attaching my code and the errors..can anyone kindly help me with uit.. Thanx a lot. Regards, Laksh courses_controller.rb: class Array def comb(n = size) if size n or n 0 elsif n == 0

[Rails] Re: Handle Net::FTP connection timeout

2009-03-31 Thread bill walton
Hi Brian, On Tue, 2009-03-31 at 16:14 +0200, Brian Zz wrote: I have a method that uploads a selection of files via FTP. For each file the method gets the file's associated ftp host/domain, user name and password, connects, uploads the file, updates the status of the file and saves the

[Rails] Re: Workling - Queue List

2009-03-31 Thread Danimal
Hi Manuel, Personally, I don't think it's a bad practice at all. I have an app that does video uploads and conversions. The way I do it is to upload the video, store it in the DB in a videos table with a status of unconverted then spawn a conversion thread (I'm using spawn, but the idea would

[Rails] Re: Can RJS render new javascript?

2009-03-31 Thread dinoD
Thanks Fred. I see in the code that you're correct (however that link implies that you can do this, it shows an example of how to add a script tag). So generically, is it ever possible to use an ajax call, such as link_to_remote, where response partial renders javascript? Thanks, Dino On Mar

[Rails] Re: Routing error in nested resources

2009-03-31 Thread Danimal
Hi Carlos! Because of the nesting. For example, I recently hacked up a version of Beast which is nested similarly to yours: Forums with many Topics with many Posts. Creating a new post has the following resource path: / forums/:forum_id/topics/:topic_id/posts/new Even though the topic_id in my

[Rails] Re: new to RoR..need help with the error in my code

2009-03-31 Thread Fernando Perez
cutelucks Ms wrote: hello, I am a new RoR developer and am struck with some errors in the code..i am attaching my code and the errors..can anyone kindly help me with uit.. Thanx a lot. Post even more code next time please. -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Can RJS render new javascript?

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:03 pm, dinoD dinodorr...@yahoo.com wrote: Thanks Fred.  I see in the code that you're correct (however that link implies that you can do this, it shows an example of how to add a script tag).  So generically, is it ever possible to use an ajax call, such as link_to_remote,

[Rails] Re: Handle Net::FTP connection timeout

2009-03-31 Thread Frederick Cheung
On Mar 31, 3:41 pm, Danimal fightonfightw...@gmail.com wrote: The flip-side may make more sense, while I think of it: spawn a thread to do the FTP connection and have your main thread sleep 30 seconds. Then have the main thread check the status and if need be kill the FTP connection or the

[Rails] Re: :first and :all giving different first records

2009-03-31 Thread Danimal
Ryan, I had something similar on Rails 2.2.2 recently. In my case, Object.first was returning nil but Object.all.first was working. I banged my head for a bit then decided it wasn't important to solve it at this time as the client just needed the project done, so I left it as Object.all.first,

[Rails] Re: Error in Mysql Connection

2009-03-31 Thread Sumanth Krishna
Thanks for the listing Hao Zhao :) -- 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: javascript encodeURIComponent equal code

2009-03-31 Thread Nanyang Zhan
Frederick Cheung wrote: Well the difference is that the javascript stuff is produced UTF16 and the ruby UTF8 (although the documentation I can find suggests that the javascript should also be producing utf8).ith ruby code? Thank you for your replied. May be it is the true. But how can the

[Rails] Re: How can I divide my Page into different Sections?

2009-03-31 Thread Danimal
Philipp, Take a look at path_prefix: http://api.rubyonrails.org/classes/ActionController/Resources.html That should do what you want. You could go about it other ways as well, but that's probably the best approach. Remember that rake routes is your best friend in this case... it lets you see

[Rails] Rails 2.3.2 bug? Detecting changed fields...

2009-03-31 Thread Meech
I have a text field in the database, lets call it log. If I do something like this: x = MyModel.find(1) x.log append some text x.save Nothing is saved. If I do something like this: x = MyModel.find(1) x.log += append some text x.save It works. Seems like a bug.

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:27 pm, Nanyang Zhan rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: Well the difference is that the javascript stuff is produced UTF16 and the ruby UTF8 (although the documentation I can find suggests that the javascript should also be producing utf8).ith

[Rails] Re: TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?

2009-03-31 Thread Colin Law
I am no expert on this but Timezone works ok for me on Rails 2.2.2 so my comments below may help. Which version of Rails are you using? 2009/3/31 Rick Schumeyer rschume...@ieee.org My environment.rb contains config.time_zone = 'UTC' Where is this located in environent.rb. Mine is inside

[Rails] Re: Rails 2.3.2 bug? Detecting changed fields...

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:33 pm, Meech meech...@gmail.com wrote: Nothing is saved. If I do something like this: x = MyModel.find(1) x.log += append some text x.save It works.   Seems like a bug. See http://ar.rubyonrails.org/classes/ActiveRecord/Dirty.html - if you change things inplace you need

[Rails] Re: :first and :all giving different first records

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:20 pm, Danimal fightonfightw...@gmail.com wrote: If it doesn't work right in SQL, then you've ruled out Rails, and can focus on what is screwed up with MySQL. It's a mysql bug: see http://bugs.mysql.com/bug.php?id=37830 and http://lists.mysql.com/commits/49739 Fred Best of

[Rails] Job Oppurtunity: Ruby on Rails Developer - London

2009-03-31 Thread leapfrogcaree...@googlemail.com
I have a job opportunity for “Ruby on Rails Developer”, with our one of my client is based in “London”. If any one is interested, please Email your resume to: t...@leapfrogcareers.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Frederick Cheung
On Mar 31, 4:44 pm, Nanyang Zhan rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: Those aren't playing with encodings which is apparently the issue here. Why does it matter anyway? ok. Here is the source code of ERB::Util.url_encode(s) method. # File erb.rb, line 801  

[Rails] Re: Handle Net::FTP connection timeout

2009-03-31 Thread Brian Zzzzzz
Frederick Cheung wrote: On Mar 31, 3:41�pm, Danimal fightonfightw...@gmail.com wrote: The flip-side may make more sense, while I think of it: spawn a thread to do the FTP connection and have your main thread sleep 30 seconds. Then have the main thread check the status and if need be kill

[Rails] Re: many to many question

2009-03-31 Thread Danimal
Is this what you are looking for? http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes -Danimal On Mar 29, 9:24 pm, Me chabg...@gmail.com wrote: Anyone?  Am I including enough info? On Mar 27, 10:41 pm, Me chabg...@gmail.com wrote: I have a form that has an

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Nanyang Zhan
Frederick Cheung wrote: well s.unpack(U*) will turn a string into a array of integers (utf code points) that it should then be easy to split into bytes. I'd start from scratch rather than using url_encode though. Thanks! Fred. 中文.unpack(C*) = [228, 184, 173, 230, 150, 135]

[Rails] Re: many to many question

2009-03-31 Thread Chris Habgood
No, I have to run 2.1.0 due to fcgi on windows. On Tue, Mar 31, 2009 at 11:00 AM, Danimal fightonfightw...@gmail.comwrote: Is this what you are looking for? http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes -Danimal On Mar 29, 9:24 pm, Me

[Rails] Re: ANNOUNCE: Hirb - A gem enhancing your script/console

2009-03-31 Thread Danimal
Gabriel, This looks pretty cool! Quick question: is there a way to set this up to be used automatically from script/console and/or irb? Thanks, -Danimal On Mar 27, 2:39 pm, cldwalker gabriel.hor...@gmail.com wrote: Hi,   I'm announcingHirb, a mini view framework which enables script/

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Tom Ha
Thanks a lot for your replies! Unfortunately, I couldn't get it to work - no error message whatsoever (log, etc.) - emails are printed entirely in the log - emails are not stored in the database table - even if I set delivery_method = :smtp, the emails are not sent If anyone has an idea why,

[Rails] Re: many to many question

2009-03-31 Thread Chris Habgood
Actually yes I have seen quite a bit on rails 2.3 but unable to use due to FCGI not working with the extra stack. On Tue, Mar 31, 2009 at 11:00 AM, Danimal fightonfightw...@gmail.comwrote: Is this what you are looking for?

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Sean McGilvray
I know you switched to the new adzap. Did you follow there instructions to getting it up and running that are on the page. It is a little different than the original. Sean McGilvray Executive Director Identity Theft Specialist Pre-Paid Legal Service's, Inc. NYSE:PPD Phone: 760-486-1019

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Tom Ha
I actually did everything they say on their page - except for: - Create a new migration (since my old db table is already there + I assume it remains the same) - Create a new model (since my old model already exists + I assume it remains the same) - Then to run it: $ ar_sendmail (since

[Rails] Re: Does ARMailer work in Rails 2.3 ?!

2009-03-31 Thread Sean McGilvray
ADZap has a ticketing system at adzap.lighthouseapp.com that will allow you to submit a ticket and he is really quick about replying. Make sure to put in your code and traces that you check how to put those in with the format helper section. Sean McGilvray Executive Director Identity Theft

[Rails] Re: Multi-steps forms aka wizards

2009-03-31 Thread Raul Martinez
Does anyone know about the act_as_wizard plug-in?? Any experience?? http://github.com/Adkron/actsaswizard/tree/master Tanks a lot, Raul. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Frederick Cheung
On Mar 31, 5:04 pm, Nanyang Zhan rails-mailing-l...@andreas-s.net wrote: when: 中文.unpack(U*) = [20013, 25991] So, it is a way turning [20013, 25991] to '%D6%D0%CE%C4', right? Well 20013 is 0x4E2D which is the utf16 for the first of your characters. Looking back at what you write I'd no

[Rails] Re: What's 'logger', really

2009-03-31 Thread Stan Kaufman
On Mar 30, 1:32 pm, Frederick Cheung frederick.che...@gmail.com wrote: You can't call it from any method. ActionController::Base, ActiveRecord::Base and a few others have accessors called logger that returns a Logger object Rails also stores a Logger object in RAILS_DEFAULT_LOGGER, so you can

[Rails] Re: ANNOUNCE: Hirb - A gem enhancing your script/console

2009-03-31 Thread Philip Hallstrom
This looks pretty cool! Quick question: is there a way to set this up to be used automatically from script/console and/or irb? Should be able to just put the following into your ~/.irbrc require 'hirb' Hirb::View.enable Thanks, -Danimal On Mar 27, 2:39 pm, cldwalker

[Rails] Re: javascript encodeURIComponent equal code

2009-03-31 Thread Nanyang Zhan
Frederick Cheung wrote: I'd no idea where D6D0 is coming from OK, problem solved. Thank you, Fred. I may never have it done without your help. It turns out %D6%D0%CE%C4 is not a utf16 relate result, but a GB2312 encoding production. I convert the string from utf8 to GB2312 with iconv,

[Rails] Updating a new id created from Ajax call in the same .js.rjs

2009-03-31 Thread Raimon Fs
Hello, I'm playing a little with ajax and some visual effects. What I'm doing is creating and modifying rows, open a new window with ajax, do the stuff, and update the main div page with the new row. The action can be add a new row, modify a present row, or delete a row. If the row has been

[Rails] Re: :first and :all giving different first records

2009-03-31 Thread Ryan Waldron
Thank you! That was it. You're the man! :) I went ahead and jumped from MySQL 5.0.x to 5.1.32, so no doubt I will soon have new adventures to relate. On Tue, Mar 31, 2009 at 10:39 AM, Frederick Cheung frederick.che...@gmail.com wrote: On Mar 31, 4:20 pm, Danimal fightonfightw...@gmail.com

[Rails] Re: Firebird adapter HELP???????

2009-03-31 Thread Rick Fiorentino
Thanks for sharing the knowledge, you're a life-saver. Best regards, Rick -- 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,

[Rails] form_for, partials, and link_to_remote

2009-03-31 Thread Will Clark
I'm using Rails 2.3.2 with a form to edit a Page object: % form_for([:admin, @page], :class = form) do |f| % #... % end % In that form I'm also using fields_for/nested models. I want the ability in the form to have a link_to_remote that calls a partial that has the fields_for related to the

[Rails] some light security on a voting web site

2009-03-31 Thread Andy
I'm creating a site where a profile can be voted on by guest users. I want to prevent basic fraud by disallowing multiple votes for the same profile in one session. I was thinking about using a session array and checking for the profile ID in the session array. So far, it's not working

[Rails] Packaging Rails App as Standalone EXE

2009-03-31 Thread Jean-Etienne Durand
Hi, Does anyone know what is currently the proper way to distribute a Rails app as a windows exe (NT Service, how to package, ...). I know there was http://www.erikveen.dds.nl/distributingrubyapplications/rails.html, but it's pretty old. Thanks -- Posted via http://www.ruby-forum.com/.

  1   2   >