[Rails] Re: model attached to model validation

2009-07-22 Thread erwin
You can use nested forms (site has_one or has_many 'equipment') http://railscasts.com/episodes/75-complex-forms-part-3 http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes erwin On 21 juil, 02:42, Me chabg...@gmail.com wrote: I have a model say site  and

[Rails] Arrays in Ruby ..

2009-07-22 Thread Hemant Bhargava
Hi Champs, The scenario is something like this .. I am having an array which consists of elements as:- array[0] = dayName; array[1] = date; array[2] = AnotherDayname .. may be same .. array[3] = anotherdate .. may be same .. array[4] = AnotherDayname .. may be same .. array[5] = anotherdate ..

[Rails] Re: offeride :limit named_scope default_scope

2009-07-22 Thread Dingding Ye
Seems it's a bug of 2.3.2 and fixed in 2.3.3. Best regards. sishen On Sat, Jul 11, 2009 at 11:55 PM, Michal Burak rails-mailing-l...@andreas-s.net wrote: Hi, Rails 2.3.2 class TestD ActiveRecord::Base default_scope :limit = 12 named_scope :limit, lambda { |num| { :limit = num} }

[Rails] Re: aptana RadRails

2009-07-22 Thread Renz Mendoza
Thank you so much for the responses guys.. Have a nice one! =) 2009/7/21 Marnen Laibow-Koser mar...@marnen.org On Jul 21, 7:32 am, Renzo renz.perez.mend...@gmail.com wrote: Guys.. Have you used this IDE for RoR... Is it good to use for those who are starting for RoR.. I really want to

[Rails] Re: my first app with RoR problem.

2009-07-22 Thread Renz Mendoza
What is cygwin? Previously I'm having a hard time in displaying the simple outputs in RoR.. But it's only just the beginning... Thank you for the responses guys, I appreciate it.. Have a nice one ahead.. 2009/7/21 Colin Law clan...@googlemail.com 2009/7/21 Hassan Schroeder

[Rails] Re: Help For Testing ruby on rails?

2009-07-22 Thread Sijo Kg
To start with read http://guides.rubyonrails.org/testing.html Sijo -- 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

[Rails] Re: aptana RadRails

2009-07-22 Thread Roderick van Domburg
Renzo wrote: Guys.. Have you used this IDE for RoR... Is it good to use for those who are starting for RoR.. I really want to learn RoR to learn new IT knowledge.. And I believe it would help me on my Web design and development project.. Just give me a tip if it's ok to use this IDE. Thanks.

[Rails] Re: aptana RadRails

2009-07-22 Thread Karthik Kantharaj
Roderick van Domburg wrote: Renzo wrote: Guys.. Have you used this IDE for RoR... Is it good to use for those who are starting for RoR.. I really want to learn RoR to learn new IT knowledge.. And I believe it would help me on my Web design and development project.. Just give me a tip if it's

[Rails] Re: Help For Testing ruby on rails?

2009-07-22 Thread Karthik Kantharaj
Sijo Kg wrote: To start with read http://guides.rubyonrails.org/testing.html Sijo Hi sijo Thank you I need to ask one thing how to add data to database and check As i am new to ruby on rails i dont know how to do this karthik.k -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Machinist - having problems stubbing an after_create filter

2009-07-22 Thread Max Williams
Gustav Paul wrote: Hey Max, Try: instance = YourModel.make_unsaved then stub the after_create method and save the object. Regards, Gustav Paul On Tue, Jul 21, 2009 at 5:50 PM, Max Williams aha! If only there was an rdoc for the version of machinist i have installed i could

[Rails] Re: Rails nested resource issue

2009-07-22 Thread Sijo Kg
Hi I think you can do do like % form_for @household, :url = grant_application_household_path(@grant_application) do |f| % OR % form_for [...@grant_application, :household] do |f| % undefined method 'grant_households_path' for #ActionView::Base: Yes expects helper

[Rails] Re: http basic authentication and restful authentication

2009-07-22 Thread Wouter
Please help me! Thanx On Jul 16, 4:37 pm, Wouter wouterg...@gmail.com wrote: hey, I have created a web app in Ruby On Rails and users can login and register with resftul authentication. Now I am creating an Android application where the user can access some parts of the website (xml

[Rails] Re: How can I implement authentication in my API?

2009-07-22 Thread Wouter
But with this code i have to authenticate every time when i try to access the website.. I have this code for authenticate: def authenticate case request.format when Mime::XML, Mime::ATOM if self.user = authenticate_or_request_with_http_basic { |u, p|

[Rails] Re: Ruby 1.9.x Rails Performance

2009-07-22 Thread Conrad Taylor
On Wed, Jul 22, 2009 at 1:49 AM, Josh joshbwh...@gmail.com wrote: Hello All, I read an article a while back about performance in Ruby. I remember a lot of talk about vast improvements in ruby 1.9.x (completely new compiler code). I'm thinking about making the upgrade on my Redhat 5 server

[Rails] Re: Waiting for 1 connection to finish

2009-07-22 Thread Conrad Taylor
On Wed, Jul 22, 2009 at 2:04 AM, Fernando Perez rails-mailing-l...@andreas-s.net wrote: This morning all my Thin process are stuck again :-(, something seems to happen during the night or at least during a long period of time so that all processes end up blocked. Have you done any sand-box

[Rails] Re: aptana RadRails

2009-07-22 Thread Roderick van Domburg
i am also using the same ide for past three weeks I need to know how to do testing unit, functional i don't know how to pass values to database through testing any idea how to do Best is to buy a book. See: http://rubyonrails.org/documentation -- Roderick van Domburg

[Rails] Re: Waiting for 1 connection to finish

2009-07-22 Thread Fernando Perez
Have you done any sand-box (i.e. staging server) testing prior to migrating your production application from 2.3.2 to 2.3.3? Everything works fine on my dev machine, and everything works fine (for a limited time though) on the production server. This problem appeared prior to upgrading

[Rails] Re: Problems with accepts_nested_attributes_for

2009-07-22 Thread Pat
Hi Anthony, It looks like your form_for line in your view is wrong... try this: % form_for(@parent) do |p| % ...instead of this: % form_for :parent, :url = { :action = :create } do |p| % For some reason the way you called form_for isn't compatible with the nested attributes feature, and

[Rails] Route to static folder (to browse files)

2009-07-22 Thread sa 125
Hi - I want to enable access to a directory inside my app's public folder. This means that when a user will navigate to http://myapp.com/files, he will actually be accessing the root of RAILS_ROOT/public/files. This folder will contain static files, and doesn't really need any controller/actions

[Rails] Re: Waiting for 1 connection to finish

2009-07-22 Thread Fernando Perez
Cool my processes are blocking and here is what $ netstat -anp is giving me: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name [...] tcp 1239 0 10.0.0.2:3100 10.0.0.1:36186 CLOSE_WAIT - tcp1 0 10.0.0.2:3100

[Rails] Record Mapping ..

2009-07-22 Thread Hemant Bhargava
Ok .. I am having one more problem for you guyz .. :) Actually .. i am taking records into an array with command .. array = ModelName.find(:all, :conditions) .. And then again i have to give conditions on array records .. which i can access easily by for loop .. Can i do it .. ? -- Posted via

[Rails] Re: Route to static folder (to browse files)

2009-07-22 Thread Gustav Paul
Hey, That shouldn't need any modification to your routes. Unless you have a very peculiar setup, files from your ./public/ directory are automatically served as static. RAILS_ROOT/public/files/some_file.pdf Should be accessible as: http://myapp.com/files/some_file.pdf Regards, Gustav Paul On

[Rails] Problem when copying files somehow related to REXML

2009-07-22 Thread Javier Quevedo
Hi guys. I am trying to copy files from one folder to another. The code is quite simple: frompath = File.join(fromdirectory,filename) topath = File.join(todirectory,filename) FileUtils.cp(frompath, topath) The code actually works and indeed copies the images. The problem is

[Rails] radio_button not updating the database

2009-07-22 Thread Tamilselvi Srinivasan
Hi, Am creating a survey, in which am getting the questions from question table and answers from answers table. In the survey table am displaying the questions with the answers as multiple choice using radio buttons. Also while selcting the option the vote_count should be increased. The front

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Rails List
Tamilselvi Srinivasan wrote: Hi, Am creating a survey, in which am getting the questions from question table and answers from answers table. In the survey table am displaying the questions with the answers as multiple choice using radio buttons. Also while selcting the option the vote_count

[Rails] Re: Problem when copying files somehow related to REXML

2009-07-22 Thread Frederick Cheung
On Jul 22, 10:39 am, Javier Quevedo jquev...@gmail.com wrote: After that, I loop through the images array to get and copy all of the image files. I must insist that before throwing the exception, the files are actually copied. Could you show the entire code - it's hard to say much from

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Tamilselvi Srinivasan
Tried with that, no change. Keep a default value in the answer table for this particular field instead of keeping it NULL Kannan http://www.classifieds.org.in -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Rails List
Tamilselvi Srinivasan wrote: Tried with that, no change. Keep a default value in the answer table for this particular field instead of keeping it NULL Kannan http://www.classifieds.org.in %= radio_button yourmodel, model-attribute, value, :onclick=something % -- Posted via

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Tamilselvi Srinivasan
Thanks for the quick reply, Am getting the radio button options from answers table. also its a group of radio buttons. so the count means for the radio_button id. if i change the count as follows %=radio_button(:survey, :nominees, count, :onclick = @voting.increment!('vote_count') ) % %=

[Rails] Re: How to Disable Pluralization

2009-07-22 Thread Franco Catena
I also agree with that, I want to make my point cleaner. English is not my mother language (if you don't figure it out yet), and programming in Rails is often a pleasure, but if you want to program in Spanish for example, the pluralization don't work. For example the plural of Ciudad (City) is

[Rails] Logger::ShiftingError

2009-07-22 Thread william
#---lib/app_logger.rb require 'logger' class AppLogger attr_writer :man_name, :emp_name def initialize(man_name, emp_name) @man_name = man_name @emp_name = emp_name log_path = log/ file_name = file.log log_level = ACTIVITY log_file = log_path

[Rails] Re: radio_button not updating the database

2009-07-22 Thread Frederick Cheung
On Jul 22, 12:31 pm, Tamilselvi Srinivasan rails-mailing-l...@andreas- s.net wrote: Thanks for the quick reply, Am getting the radio button options from answers table. also its a group of radio buttons. so the count means for the radio_button id. if i change the count as follows

[Rails] Re: my first app with RoR problem.

2009-07-22 Thread Bryan Ash
Alternatively, you could take the advise from: http://www.ruby-forum.com/topic/136032 and gem install sqlite3-ruby -v=1.2.3 Enjoy! Bryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] How to build scope for count() has many polymorphic?

2009-07-22 Thread Joao Silva
Hello, i have the following models in my application: class Message ActiveRecord::Base has_many :comments, :as = :commentable, :dependent = :destroy, :order = 'created_at ASC' end class Comment ActiveRecord::Base belongs_to :commentable, :polymorphic = true end I need commented named

[Rails] Re: Record Mapping ..

2009-07-22 Thread Hemant Bhargava
Done .. Thanks .. Hemant Bhargava wrote: Ok .. I am having one more problem for you guyz .. :) Actually .. i am taking records into an array with command .. array = ModelName.find(:all, :conditions) .. And then again i have to give conditions on array records .. which i can access

[Rails] Hash Problem .. + Urgent

2009-07-22 Thread Hemant Bhargava
Hi Guyz, Problem with me is that whenever i am storing values in my hash.. it stores perfectly .. But when i am trying to print it .. i mean try to view its contents .. then contents coming in wrong order .. which i dont want .. Can sum one help me bit about it .. ? -- Posted via

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Maurício Linhares
Hashes won't keep the insertion order in Ruby (or any other language, you'll usually have to use some kind of ordered hash). - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Jul 22, 2009 at 9:23 AM, Hemant Bhargavarails-mailing-l...@andreas-s.net

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Hemant Bhargava
So no solution .. is it .. ? Maurício Linhares wrote: Hashes won't keep the insertion order in Ruby (or any other language, you'll usually have to use some kind of ordered hash). - Maur�cio Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Jul 22,

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Hemant Bhargava
But i remember i had done it in Perl .. So y not with ruby .. Hemant Bhargava wrote: So no solution .. is it .. ? Maurício Linhares wrote: Hashes won't keep the insertion order in Ruby (or any other language, you'll usually have to use some kind of ordered hash). - Maur�cio

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Maurício Linhares
http://loopkid.net/articles/2008/06/19/ordered-hashes-in-ruby-1-8 - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Jul 22, 2009 at 9:29 AM, Hemant Bhargavarails-mailing-l...@andreas-s.net wrote: But i remember i had done it in Perl .. So y not

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread David A. Black
Hi -- On Wed, 22 Jul 2009, Hemant Bhargava wrote: So no solution .. is it .. ? Hashes in Ruby 1.9 are ordered by key insertion order. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting training: http://www.rubypal.com Now available: The Well-Grounded Rubyist

[Rails] Re: production and cache

2009-07-22 Thread James Englert
What kind of cache are you using? Could you copy your environment file here? On Wed, Jul 22, 2009 at 4:32 AM, Alessandro Scolavino rails-mailing-l...@andreas-s.net wrote: I have read a lot this few days about caching in ruby... I see that the only solution for me is to use cache action and

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Hemant Bhargava
No i dont think so .. The way i am inserting values in hash is not d way i am getting these values .. David A. Black wrote: Hi -- On Wed, 22 Jul 2009, Hemant Bhargava wrote: So no solution .. is it .. ? Hashes in Ruby 1.9 are ordered by key insertion order. David -- David A.

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Conrad Taylor
2009/7/22 Maurício Linhares mauricio.linha...@gmail.com Hashes won't keep the insertion order in Ruby (or any other language, you'll usually have to use some kind of ordered hash). - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr This isn't true

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread Hemant Bhargava
By d way champs .. where to write the code for require 'file' .. ? in layouts file or in same file .. or in controller or in model .. :) Conrad Taylor wrote: 2009/7/22 Maurício Linhares mauricio.linha...@gmail.com Hashes won't keep the insertion order in Ruby (or any other language,

[Rails] Re: AJAX render :partial does not update if specified view matches current view

2009-07-22 Thread Thomas Allen
Is what I'm attempting possible with render :partial? On Jul 20, 3:55 pm, Thomas Allen thomasmal...@gmail.com wrote: I have some simple code that renders a form to an element specified in form_remote_tag :update. The problem is that, if the loaded view matches the view to render, Rails does

[Rails] Re: Hash Problem .. + Urgent

2009-07-22 Thread David A. Black
Hi -- On Wed, 22 Jul 2009, Hemant Bhargava wrote: David A. Black wrote: Hi -- On Wed, 22 Jul 2009, Hemant Bhargava wrote: So no solution .. is it .. ? Hashes in Ruby 1.9 are ordered by key insertion order. No i dont think so .. The way i am inserting values in hash is not d way i am

[Rails] Re: production and cache

2009-07-22 Thread Alessandro Scolavino
James Englert wrote: What kind of cache are you using? Could you copy your environment file here? On Wed, Jul 22, 2009 at 4:32 AM, Alessandro Scolavino It's the dafault file, i have made no change # Settings specified here will take precedence over those in config/environment.rb #

[Rails] Re: AJAX render :partial does not update if specified view matches current view

2009-07-22 Thread Frederick Cheung
On Jul 22, 1:51 pm, Thomas Allen thomasmal...@gmail.com wrote: Is what I'm attempting possible with render :partial? Have you checked with firebug to see what is actually going back and forth between the browser and the server ? (fun issues like the browser helpfully autocompleteing the new

[Rails] Ruby on Rails and prepated statements

2009-07-22 Thread kronos
It is knows that Ruby mysql driver supports prepared statements. Why do not active record adapters support them? Is there any reason for it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] [JOBS] Senior Ruby Developer Needed in Columbus, Ohio

2009-07-22 Thread G Consulting LLC
Good morning, If you’re looking for something new, I'm in need of senior Ruby developer for an upcoming project in Columbus, Ohio. Please email gfou...@g-consultingllc.com for more details. Regards, Greg Foulks G Consulting LLC http://www.g-consultingllc.com

[Rails] Re: aptana RadRails

2009-07-22 Thread André Martins
Hi, I use the INTYPE in my Windows and I like very much! Is very fast, simple for any language and include Bundles like Textmate! See details: http://intype.info Greetings from Brazil =) André Martins Geniart Tecnologia www.geniart.com.br On Jul 22, 6:32 am, Roderick van Domburg

[Rails] Problem sending files ~10KB using Active Resource

2009-07-22 Thread onomato
Hey everybody, scenario: frontend-server gets files from a form.file_field and should send the filedata to a backend-server via (Hyper)ActiveResource! I used the following code to access a method in a backend-server and send the filedata: CampaignTopic.post(:icon_attachments_rebuild_and_save,

[Rails] Re: Route to static folder (to browse files)

2009-07-22 Thread sa 125
Gustav Paul wrote: That shouldn't need any modification to your routes. Unless you have a very peculiar setup, files from your ./public/ directory are automatically served as static. RAILS_ROOT/public/files/some_file.pdf Should be accessible as:

[Rails] Re: How to Disable Pluralization

2009-07-22 Thread Rick DeNatale
On Wed, Jul 22, 2009 at 7:37 AM, Franco Catenafrancocat...@gmail.com wrote: I also agree with that, I want to make my point cleaner. English is not my mother language (if you don't figure it out yet), and programming in Rails is often a pleasure, but if you want to program in Spanish for

[Rails] Re: model attached to model validation

2009-07-22 Thread Chris Habgood
I do an ajax to add the equipment. The models are not nested. On Wed, Jul 22, 2009 at 3:40 AM, Josh joshbwh...@gmail.com wrote: I would say that in your case the easy way is to not nest the forms. Just return in your post the list of equipments and the site. In your controller, save or

[Rails] Re: Route to static folder (to browse files)

2009-07-22 Thread Zach Karpinski
One additional note here for Apache users: it is pretty standard to turn off the browsing feature on directories. If your virtual host configuration allows for it you can override this option on a per directory basis with .htaccess files. To enable: Options Indexes To disable: Options

[Rails] Re: Problem sending files ~10KB using Active Resource

2009-07-22 Thread Zach Karpinski
What web server and how are you serving rails? I have a caching media server built in rails and I ran into a couple problems that look identical to this. First I was on Apache2 with Ruby Enterprise Edition and Passenger Phusion using MySQL as the database. In my case I needed to do two things.

[Rails] Re: How to build scope for count() has many polymorphic?

2009-07-22 Thread Joao Silva
anybody knows? -- 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 rubyonrails-talk@googlegroups.com To

[Rails] how to pass ruby objects to javascript ?

2009-07-22 Thread Nilesh Kulkarni
hi all, I have following problem, I am using google map api , I have business_locations array defined in view it contains latitude and longitude in following format lng-142.122745lat42.674224 lng-112.122745lat46.674224 lng-122.122745lat40.674224 I am sending locations array to partial

[Rails] Re: AJAX render :partial does not update if specified view matches current view

2009-07-22 Thread Thomas Allen
Hm, I'll try explicitly setting the [nonstandard] autocomplete attribute off in the inputs... Thomas On Jul 22, 9:02 am, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 22, 1:51 pm, Thomas Allen thomasmal...@gmail.com wrote: Is what I'm attempting possible with render :partial?

[Rails] Re: Help For Testing ruby on rails?

2009-07-22 Thread byrnejb
On Jul 22, 12:54 am, Karthik Kantharaj rails-mailing-l...@andreas- s.net wrote: Hi guys I am using Aptana IDE How to do unit testing is there any sample explaining this I got some tutorial but that is not complete as i am a beginner I just went through this experience myself and I will

[Rails] code reloading by timer (in development env)

2009-07-22 Thread Alexey Petrushin
Hello, i'm working on huge rails project and it's terribly slow in development mode. There are lots of code and lots of AJAX requests, so it's very slow as (i guess) it reloads all the code several times per one page. I'm wondering, maybe there is a way to speed it up? Maybe it's possible to

[Rails] Upgrading Ruby - will it affect Rails? - 1.8.6 to 1.9.1

2009-07-22 Thread Älphä Blüë
Hi all, I have a question regarding upgrading Ruby and how it may or may not affect rails. Other than rubygems and gem versions that my project will use (I know I have to check to make sure they will work with 1.9.1 on windows), will there be any issues upgrading that I might not be aware of?

[Rails] Re: code reloading by timer (in development env)

2009-07-22 Thread rilindo foster
Silly question: Are you using Webrick or Mongrel? When I prepped up a little rails dev app in Webrick, it was so slow I wanted to chuck it. Then I put in Mongrel and it speed things up by literally a 100+ percent. On Wed, Jul 22, 2009 at 10:41 AM, Alexey

[Rails] ERROR: Failed to build gem native extension.

2009-07-22 Thread John Mcleod
Hello all, I tried to install the 'amatch' gem and received the following error: === C:\Ruby\bingem install amatch-0.2.3.gem Building native extensions. This could take a while... ERROR: Error installing

[Rails] Re: ERROR: Failed to build gem native extension.

2009-07-22 Thread Älphä Blüë
Hi John, You are on windows so you are most likely using nmake not make. Secondly, you need to have a c-compiler on your system and in your path in order for nmake to be used. But, you should take a step back for a moment. First, this is a Ruby issue and you are on a rails forum so you

[Rails] Re: Upgrading Ruby - will it affect Rails? - 1.8.6 to 1.9.1

2009-07-22 Thread Älphä Blüë
I'll make the leap on my vmware box and test it myself. No response necessary now. -- 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

[Rails] Re: Problem when copying files somehow related to REXML

2009-07-22 Thread sami
We had faced same type of problem while working on www.scrumpad.com , next generation scrum project management tool. In that case we have installed a gem rexml fix. that had saved us from this problem you can check that one. basically rexml is used for parsing On Jul 22, 3:39 pm, Javier Quevedo

[Rails] Re: ERROR: Failed to build gem native extension.

2009-07-22 Thread John Mcleod
Thanks again for the quick reply. You are right. This is not the place for this post. My apologies. I will move to the appropriate forum. The funny thing is that I'm running a VM of Windows 2003 on a MAC. I'm really a PHP guy with around 2 weeks (department mandated) of Ruby experience. Thanks

[Rails] Re: ERROR: Failed to build gem native extension.

2009-07-22 Thread Älphä Blüë
John Mcleod wrote: Thanks again for the quick reply. You are right. This is not the place for this post. My apologies. I will move to the appropriate forum. The funny thing is that I'm running a VM of Windows 2003 on a MAC. I'm really a PHP guy with around 2 weeks (department mandated) of

[Rails] Re: Upgrading Ruby - will it affect Rails? - 1.8.6 to 1.9.1

2009-07-22 Thread heimdull
One word, yes! If you want to use Ruby 1.9 with Rails then you have to reinstall all the gems under Ruby 1.9 which is where you might get issues. Currently Ruby 1.9.1 and Rails 2.3.3 works fine but there are issues with some gems, please check out this website for more information about what

[Rails] Re: Swfobject rails 2.3.2 - get session vars

2009-07-22 Thread Alberto Ruffo
up -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] Re: Upgrading Ruby - will it affect Rails? - 1.8.6 to 1.9.1

2009-07-22 Thread Älphä Blüë
Hiya mate, Yeah I'm not worried about gems in my project. A while back I wanted to set out and create my own windows compiled version of ruby. I ended up settling on Luis Lavena's one-click mingw sandbox 1.9.1 - 1.9.2 checkout instead. There were just too many libraries to compile to get

[Rails] Re: How to Disable Pluralization

2009-07-22 Thread sami
Rails main motto is convention over configuration why do you want to go against the flow. in that case you have to face lots of problem in future. but you can do that by changing the inflection or the generation system of ROR On Jul 18, 1:24 pm, harun harun...@gmail.com wrote: Hi, First, I am

[Rails] Problem with deploying changes in production.

2009-07-22 Thread sultan
Problem with deploying changes in production. In my /config/environment/production.rb, if I have: config.cache_classes = false and I run “ruby script/server -e production” I can see my new changes. When I change the /config/environment/production.rb back to: config.cache_classes = true and kill

[Rails] Re: button_to_remote problem index 115225 out of string

2009-07-22 Thread Max Williams
Max Williams wrote: %= button_to_remote Delete this sku, music_service_sku_path(@music_service, sku), :method = :delete % Never mind - the problem was that i had to pass the path as the :url option, ie %= button_to_remote Delete this sku, :url =

[Rails] button_to_remote problem index 115225 out of string

2009-07-22 Thread Max Williams
hey all I have some nested resource 'sku_price_bands' which are nested inside 'skus' which are nested inside 'music_services': in routes.rb: map.resources :music_service do |music_service| music_service.resources :skus do |sku| sku.resources :sku_price_bands end end Now, i'm

[Rails] How do I mimic Finder/Explorer views with contextual menus, etc?

2009-07-22 Thread gberz3
Hi All, I'm looking for some quality techniques for mimicking a Finder (or Explorer View). Eventually I want to have treeviews, contextual menus, etc. I'm guessing there is going to be a good deal of Javascript, which is fine, I'm just curious as to whether there are quality existing helpers,

[Rails] Re: code reloading by timer (in development env)

2009-07-22 Thread sami
i think Foster is right. webrick is bit slower. if you use Mongrel then its become more faster. you can make mongrel cluster to make it more faster. in spite of making the cluster if you think your app is still slow then you can use performance analysis tool like new relic. it will help you to

[Rails] Re: Simple Search Methode - newbie question.

2009-07-22 Thread Zach Karpinski
The variable t was assigned to the value in params[:search][:query]. It just makes the example less terse and easier to type out. The value in t gets substituted for those ? marks. The ? mark method is better than putting them directly into the conditions string. This is because Rails will

[Rails] Re: Record Mapping ..

2009-07-22 Thread Rails List
Hemant Bhargava wrote: Done .. Thanks .. Hemant Bhargava wrote: Ok .. I am having one more problem for you guyz .. :) Actually .. i am taking records into an array with command .. array = ModelName.find(:all, :conditions) .. And then again i have to give conditions on array records

[Rails] Re: Render a partial that has assosciations with something else

2009-07-22 Thread John Mossel
Thanks! -- 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 rubyonrails-talk@googlegroups.com To unsubscribe

[Rails] Re: code reloading by timer (in development env)

2009-07-22 Thread Alexey Petrushin
Silly question: Are you using Webrick or Mongrel? No, I'm using Mongrel. these small things will help you to make your site faster I'm talking about the development environment, in the production (in cluster) it works fast :). The problem is here (config/development.rb):

[Rails] Re: code reloading by timer (in development env)

2009-07-22 Thread Frederick Cheung
On Jul 22, 8:38 pm, Alexey Petrushin rails-mailing-l...@andreas- s.net wrote: The problem is here (config/development.rb): config.cache_classes = false if i change it to config.cache_classes = true it works really fast. So i hoped maybe there is a way to reload it more rarely. There's

[Rails] Re: Concerns about multiple model queries and array management

2009-07-22 Thread Rick
I've been busy the past two days. How have things worked out with all this? On Mon, Jul 20, 2009 at 11:01 AM, Älphä Blüë rails-mailing-l...@andreas-s.net wrote: Let me take a step back here and look over my associations: Are they setup incorrectly? I want team to be my core object

[Rails] Auth / Search / Paging

2009-07-22 Thread Sergio Angeletti - Gmail
Thanks for everyone authlogic is the best solution for autorisation problems I suggest the screencast railscasts.com/episodes/160-authlogic [1] now can you suggest me a solution for add an siple search on the scalfolds and a paging? Sergio Links: -- [1]

[Rails] Ruby 1.8.6 + Rails 2.3.2 + ActionMailer + Gmail SMTP

2009-07-22 Thread Ritvvij
Hi, Can someone please help me setup ActionMailer via Gmail SMTP. I tried many tutorials online and some gems too but either they are not downloadable or links not working or the suggestions are very vague. Presently I am using Ruby 1.8.6 and Rails 2.3.2 ActionMailer::Base.delivery_method =

[Rails] Singleton Object nil

2009-07-22 Thread Tyler Knappe
Hey all, I have the following in my Controller: class self attr_accessor :all_devices, :test #def initialize(devices) # @all_devices = devices #end end def initialize_devices

[Rails] helper for ajax field update

2009-07-22 Thread billv
I have a page that lists a set of tasks, each with a status field. I'd like the ability to update the status from this field, through a pop-up box. Basically, click the link, a little text area box opens, the user enters the update, clicks save, the box goes away and the update appears on the

[Rails] Re: Singleton Object nil

2009-07-22 Thread Tyler Knappe
Tyler Knappe wrote: Hey all, I have the following in my Controller: class self attr_accessor :all_devices, :test #def initialize(devices) # @all_devices = devices #end end def initialize_devices

[Rails] Re: Ruby on Rails and prepated statements

2009-07-22 Thread Marnen Laibow-Koser
On Jul 22, 9:16 am, kronos ikro...@mail.ru wrote: It is knows that Ruby mysql driver supports prepared statements. Why do not active record adapters support them? Is there any reason for it? Well, ActiveRecord sort of *does* support prepared statements, in the sense that parameterized queries

[Rails] Re: helper for ajax field update

2009-07-22 Thread bill walton
Hi Bill, On Wed, 2009-07-22 at 14:09 -0700, billv wrote: I have a page that lists a set of tasks, each with a status field. I'd like the ability to update the status from this field, through a pop-up box. Basically, click the link, a little text area box opens, the user enters the update,

[Rails] Re: Problem when copying files somehow related to REXML

2009-07-22 Thread Javier Quevedo
I found the error. It was actually my mistake. Later in the code for whatever reason I was actually opening and trying to parse an image file with REXML, so it was breaking there, not in the previous part. Thank you so much for your useful replys. On Jul 22, 5:51 pm, sami ssza...@gmail.com

[Rails] Re: rake db:migrate issue 'No migration with version number 3'

2009-07-22 Thread Carl Franz
Andrés Cirugeda Esco wrote: Can you paste the trace you get when trying db:migrate for the first time in a new application? -- Andr�s Cirugeda Esco ASPgems Email: andres at aspgems dot com 'All we have to decide is what to do with the time that is given to us'. --Gandalf. El

[Rails] Re: rake db:migrate issue 'No migration with version number 3'

2009-07-22 Thread Carl Franz
Frederick Cheung wrote: On Jul 19, 9:56�pm, Carl Franz rails-mailing-l...@andreas-s.net wrote: Why would this version of Rake be attempting to use the *^% version numbers and not the version timestamps? �Any ideas? if there is an environment variable called VERSION then rails tries to

[Rails] String as method call?

2009-07-22 Thread elliottg
Should be simple but I can't eval a string as a method call. I have poked around online a fair amount to get to the bottom of this mundane task, with no results. I have a hash fields that contains a series of AR field names and an object called news which is an AR object with that has the field

[Rails] Moneta::File

2009-07-22 Thread Mindtonic
I am looking for help with Moneta. I can’t seem to find a specific forum anywhere, so I am going to try here. I am trying to use the File option on Moneta. On my development mac, everything is peachy, but when I went to run my test on my deployment server, which is a Joyent solaris box, I ran

[Rails] Ajax, javascript_tag and JS Var trouble, help nedded.

2009-07-22 Thread David Sousa
Hello there, I have a clients controller, and I want it to respond both ajax and html to the new action. If the user uses the html action, the new partial is going to be rendered and all works with no problem. In oder hand, if a ajax request is submitted, everything renders ok (it will be

[Rails] Re: post data help

2009-07-22 Thread Mark Preston
bill walton wrote: On Wed, 2009-07-22 at 03:56 +0200, Mark Preston wrote: lot more.. Best regards, Bill Thanks for the reply, I have done the tutorials, but still am a bit confused. Confused about what, specifically? Forms all default to using POST. If you have a form and

  1   2   >