[Rails] Re: many to many relations

2010-07-20 Thread marlow79
Try class author has_one birth :through city has_one death :through city class city belongs_to death belongs_to birth class birth has_one city class death has_one city -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Jruby or Ruby(1.9.1) with Rails for lots of Java Backends

2010-07-20 Thread YoonSung Hong
Hello, I'm working on a project that requires a lot of web triggered java applications. For instance, when a user click a search button, I call java from Rails to do the heavy weight. Is it troublesome to call java application from ruby(on rails)? Can Jruby simplify calling java application and,

[Rails] Re: Re: Memcache

2010-07-20 Thread Yani Yen
Hi, What i did in my environment.rb file was created an instance of memcache and assign it to a constant: CACHE = MemCache.new('127.0.0.1') and then in my code something like this: def data_cache(key) unless output = CACHE.get(key) output = yield CACHE.set(key, output, 1.hour) end

Re: [Rails] Re: Associations Problem

2010-07-20 Thread Colin Law
On 19 July 2010 22:09, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 19, 9:26 pm, Leonardo Mateo leonardoma...@gmail.com wrote: When I do the following in script/console: s = LineItem.last.section (s.id is 21, as is LineItem.last.section_id as well) s.target I get the

[Rails] Re: Re: Memcache

2010-07-20 Thread Yani Yen
Forgot to mention : I had the configuration : config.cache_store = :mem_cache_store in my specific environment file. Still i was getting the above mentioned error Yani Yen wrote: Hi, What i did in my environment.rb file was created an instance of memcache and assign it to a constant:

Re: [Rails] Re: Strange Error undefined method `show' for # see no

2010-07-20 Thread Colin Law
On 19 July 2010 23:08, rubybox voorr...@gmail.com wrote: thanks for the comments so far, I only did a git commit on every deploy I now will do it after each few changes.. Removed some stuff from the app I added before the error occured still same error This is my full trace/error report

[Rails] Re: Jruby or Ruby(1.9.1) with Rails for lots of Java Backends

2010-07-20 Thread LiTE
http://www.javaworld.com/javaworld/jw-07-2006/jw-0717-ruby.html On 20 Lip, 01:25, YoonSung Hong hys...@gmail.com wrote: Hello, I'm working on a project that requires a lot of web triggered java applications. For instance, when a user click a search button, I call java from Rails to do the

Re: [Rails] named_scope returns Array -- find returns error?

2010-07-20 Thread Colin Law
On 19 July 2010 23:35, Seth Willits li...@ruby-forum.com wrote: From the documentation: -- class Shirt ActiveRecord::Base    named_scope :red, :conditions = {:color = 'red'} end Unlike Shirt.find(...), however, the object returned by Shirt.red is not an

Re: [Rails] Association count sorting

2010-07-20 Thread Colin Law
On 20 July 2010 03:22, badnaam asitkmis...@gmail.com wrote: I have 3 models GrandPa, Pa, Kid GrandPa = has_many :pas Pa = has_many kids When I list GrandPa I would like to present the following * 1 - GrandPa_Name 2 - List of Pas sorted by the

Re: [Rails] Re: Association count sorting

2010-07-20 Thread Michael Pavling
On 20 July 2010 04:14, badnaam asitkmis...@gmail.com wrote: Here is *AN* answer if someone else runs into this.. Your solution may certainly work... but is a bit imperative in coding terms, and does introduce an n+1 problem. Rails offers a feature called counter_cache on associations - which

[Rails] ajax problem

2010-07-20 Thread Tony Augustine
Hi i created an application which using ajax method, but unfortunately ma application is not working this is ma view page in which i used ajax. here on clickint the links it should replace the div changing_layout on the basis of values passed to the controller but for me

Re: [Rails] ajax problem

2010-07-20 Thread Colin Law
On 20 July 2010 09:44, Tony Augustine li...@ruby-forum.com wrote: Hi  i created         an  application  which using  ajax method,   but unfortunately  ma application is not   working this is  ma  view page in which i  used ajax. here on clickint the links it  should replace the div

[Rails] Re: ajax problem

2010-07-20 Thread Tony Augustine
what i meant is on clicking the link below in short %=link_to_remote image_tag(/images/ cricinfoLogo.gif),{:update = changing_layout,:url = { :controller = 'home',:action = 'change_layout',:value = 'registration'},:method = :get},:id='registr' % it should replace the div below div

Re: [Rails] Re: many to many relations

2010-07-20 Thread Sampath Munasinghe
Anybody having good tutorial for many to many relationships? I need to do following. categories can have many items item can belongs many categories i need to save all the categories and items from single form. please help me. -- You received this message because you are subscribed to the

Re: [Rails] Re: ajax problem

2010-07-20 Thread Colin Law
Could you not top post please, it makes it more difficult to follow the thread, and easier to forget to reply to something, for example you did not reply to my question asking what is in the log. See further question below On 20 July 2010 10:27, Tony Augustine li...@ruby-forum.com wrote: what i

Re: [Rails] Re: many to many relations

2010-07-20 Thread Colin Law
On 20 July 2010 10:30, Sampath Munasinghe sampathni...@gmail.com wrote: Anybody having good tutorial for many to many relationships? I need to do following. categories can have many items item can belongs many categories i need to save all the categories and items from single form. please

[Rails] Re: Re: ajax problem

2010-07-20 Thread Tony Augustine
Colin Law wrote: Could you not top post please, it makes it more difficult to follow the thread, and easier to forget to reply to something, for example you did not reply to my question asking what is in the log. See further question below On 20 July 2010 10:27, Tony Augustine

[Rails] Re: Re: ajax problem

2010-07-20 Thread Tony Augustine
Colin Law wrote: Could you not top post please, it makes it more difficult to follow the thread, and easier to forget to reply to something, for example you did not reply to my question asking what is in the log. See further question below On 20 July 2010 10:27, Tony Augustine

Re: [Rails] Re: Re: ajax problem

2010-07-20 Thread Colin Law
On 20 July 2010 10:39, Tony Augustine li...@ruby-forum.com wrote: Colin Law wrote: Could you not top post please, it makes it more difficult to follow the thread, and easier to forget to reply to something, for example you did not reply to my question asking what is in the log. See further

[Rails] Model Validations + Urgent

2010-07-20 Thread Hemant Bhargava
Hello all, How to give validation on a field which is not a database column. I mean i am having a file field(upload_resume) in my views. So i want to give validation on it that size should be less then 1mb. I tried self.upload_resume and params[:upload_resume] but both are not working. So guys,

[Rails] Re: Re: Re: ajax problem

2010-07-20 Thread Tony Augustine
Colin Law wrote: On 20 July 2010 10:39, Tony Augustine li...@ruby-forum.com wrote: /center Is the puts output appearing? � [4;35;1mSQL (1.7ms) [0m � �[0mSET client_min_messages TO 'notice' [0m Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 14:07:05) [GET]

[Rails] Tests Losing Data (factory girl)

2010-07-20 Thread Ants Pants
This is a cross post from the fg mailing list but the traffic is very low there so I thought I'd try here, too. While running a test with Cukes/FG, I pre populate a table (event_categories), run my test and it passes on a successful failure (duplicate record) When the controller executes ...

Re: [Rails] Re: Re: Re: ajax problem

2010-07-20 Thread Colin Law
On 20 July 2010 11:13, Tony Augustine li...@ruby-forum.com wrote: Colin Law wrote: On 20 July 2010 10:39, Tony Augustine li...@ruby-forum.com wrote: /center Is the puts output appearing? � [4;35;1mSQL (1.7ms) [0m � �[0mSET client_min_messages TO 'notice' [0m Processing

[Rails] Re: Re: Re: Re: ajax problem

2010-07-20 Thread Tony Augustine
Colin Law wrote: On 20 July 2010 11:13, Tony Augustine li...@ruby-forum.com wrote: Is there nothing in development.log after that? Colin no  sir,  when i check the  error  console its  showing that ajax  not  defined Perhaps ajax is not defined then. Have you remembered to in include

[Rails] Creating reflective has_and_belongs_to

2010-07-20 Thread Piotr J . Puczyński
Hi I have a question is it possible to create the reflective relation with users and friends using has_and_belongs_to. I found this post that is partly connected to my: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/dff2032301961e2d but my issue is join table friends_users

Re: [Rails] ajax problem

2010-07-20 Thread Mathew Augustine
what i meant is on clicking the link below in short %=link_to_remote image_tag(/images/ cricinfoLogo.gif),{:update = changing_layout,:url = { :controller = 'home',:action = 'change_layout',:value = 'registration'},:method = :get},:id='registr' % it should replace the div below div id

[Rails] uninitialized constant WillPaginate::LinkRenderer

2010-07-20 Thread Fernando Perez
This is becoming painful. Where the file should be? What should be in it? I am running will_paginate 3.0.pre Here is my current code sitting in initializers/ class WillPaginateRenderer WillPaginate::LinkRenderer def rel_value(page) nofollow end end Thanks for your help, -- Posted via

[Rails] Nested Models not working

2010-07-20 Thread IanJ
Urgghhh - Newbie help needed to stop me giving up on Rails. I have 3 nested models. Recipe-RecipeParts-RecipeIngredients (to the ingredients index so maybe 4 levels) class Recipe ActiveRecord::Base has_many :recipe_parts accepts_nested_attributes_for :recipe_parts class RecipePart

[Rails] Re: Tests Losing Data (factory girl)

2010-07-20 Thread Ants Pants
Solved. Sorry to take up bandwidth :( On 20 July 2010 12:36, Ants Pants antsmailingl...@gmail.com wrote: This is a cross post from the fg mailing list but the traffic is very low there so I thought I'd try here, too. While running a test with Cukes/FG, I pre populate a table

Re: [Rails] Model Validations + Urgent

2010-07-20 Thread kannav rajeev
are you using any plug in for file field like attechment_fu or paperclip . if yes please type On Tue, Jul 20, 2010 at 3:37 PM, Hemant Bhargava li...@ruby-forum.com wrote: Hello all, How to give validation on a field which is not a database column. I mean i am having a file

[Rails] Re: Model Validations + Urgent

2010-07-20 Thread Hemant Bhargava
kannav rajeev wrote: are you using any plug in for file field like attechment_fu or paperclip . if yes please type No i am not using any thing. On Tue, Jul 20, 2010 at 3:37 PM, Hemant Bhargava li...@ruby-forum.com wrote: -- You received this message because you are subscribed to the

[Rails] Re: Re: Re: Re: Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-20 Thread Fernando Perez
Hi, It's me again. Now running Rails 3 beta4 and Ruby 1.9.1, and that encoding thing is as I said a gigantic catastrophe! It still does not work! I added default_encoding, and it's as if it doesn't care about it. -- Posted via http://www.ruby-forum.com/. -- You received this message because

Re: [Rails] Re: Model Validations + Urgent

2010-07-20 Thread Ants Pants
Virtual attributes in your model? not sure if I understand your problem as I've never done file uploads with Rails. def my_non_db_field ## do something end On 20 July 2010 14:20, Hemant Bhargava li...@ruby-forum.com wrote: kannav rajeev wrote: are you using any plug in for file field like

Re: [Rails] Nested Models not working

2010-07-20 Thread Colin Law
On 20 July 2010 12:29, IanJ ian_johns...@pobox.com wrote: Urgghhh - Newbie help needed to stop me giving up on Rails. I have 3 nested models. Recipe-RecipeParts-RecipeIngredients (to the ingredients index so maybe 4 levels) class Recipe ActiveRecord::Base  has_many :recipe_parts  

Re: [Rails] Model Validations + Urgent

2010-07-20 Thread Colin Law
On 20 July 2010 11:07, Hemant Bhargava li...@ruby-forum.com wrote: Hello all, How to give validation on a field which is not a database column. I mean i am having a file field(upload_resume) in my views. So i want to give validation on it that size should be less then 1mb. I tried

Re: [Rails] Re: Associations Problem

2010-07-20 Thread Leonardo Mateo
On Tue, Jul 20, 2010 at 4:46 AM, Colin Law clan...@googlemail.com wrote: On 19 July 2010 22:09, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 19, 9:26 pm, Leonardo Mateo leonardoma...@gmail.com wrote: When I do the following in script/console: s = LineItem.last.section (s.id is

[Rails] Re: Tests Losing Data (factory girl)

2010-07-20 Thread Marnen Laibow-Koser
Ants Pants wrote: Solved. Sorry to take up bandwidth :( Solved how? Please explain so others can learn. -- 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: Nested Models not working

2010-07-20 Thread IanJ
class Recipe ActiveRecord::Base  has_many :recipe_parts  accepts_nested_attributes_for :recipe_parts class RecipePart ActiveRecord::Base        belongs_to :recipe        has_many :recipe_ingredients        has_many :ingredients, :through = :recipe_ingredients        

[Rails] Re: Re: Re: Re: Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-20 Thread Fernando Perez
Rails3 beta4 is still bugged. It should be fixed in RC1: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4807-error-encodingundefinedconversionerror-xc3-from-ascii-8bit-to-utf-8 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

Re: [Rails] Re: Tests Losing Data (factory girl)

2010-07-20 Thread Ants Pants
On 20 July 2010 14:49, Marnen Laibow-Koser li...@ruby-forum.com wrote: Ants Pants wrote: Solved. Sorry to take up bandwidth :( Solved how? Please explain so others can learn. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

Re: [Rails] render :update do |page| issue

2010-07-20 Thread Dave Aronson
On 2010/7/19 Mamadou Touré li...@ruby-forum.com wrote: I'm trying to render a partial from my controller, but nothing happens. What's wrong ? ... 2 - View: ...          % if ! @file_name_arr.nil? %              %= render :partial = files_list % ... 3 - Partial (_file_list.html.erb)

[Rails] Re: Model Validations + Urgent

2010-07-20 Thread Hemant Bhargava
Colin Law wrote: On 20 July 2010 11:07, Hemant Bhargava li...@ruby-forum.com wrote: Hello all, How to give validation on a field which is not a database column. I mean i am having a file field(upload_resume) in my views. So i want to give validation on it that size should be less then 1mb. I

Re: [Rails] Re: Re: Memcache

2010-07-20 Thread Jeffrey L. Taylor
Quoting Yani Yen li...@ruby-forum.com: Forgot to mention : I had the configuration : config.cache_store = :mem_cache_store in my specific environment file. Still i was getting the above mentioned error Yani Yen wrote: Hi, What i did in my environment.rb file was created an

[Rails] Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Marnen Laibow-Koser
Piotr J. Puczyński wrote: Hi I have a question is it possible to create the reflective relation with users and friends using has_and_belongs_to. I found this post that is partly connected to my: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/dff2032301961e2d but my

[Rails] Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: Piotr J. Puczyński wrote: Hi I have a question is it possible to create the reflective relation with users and friends using has_and_belongs_to. I found this post that is partly connected to my:

Re: [Rails] Re: Model Validations + Urgent

2010-07-20 Thread Colin Law
On 20 July 2010 14:32, Hemant Bhargava li...@ruby-forum.com wrote: Colin Law wrote: On 20 July 2010 11:07, Hemant Bhargava li...@ruby-forum.com wrote: Hello all, How to give validation on a field which is not a database column. I mean i am having a file field(upload_resume) in my views. So i

[Rails] User available query builder + backend

2010-07-20 Thread edoardoz
Hi, I look for a plugin/gem/else for a GUI+backend hooks solution to filter contents in a RoR app. Example: Customer(:id, :name, :vat_number, :state) Address(:id, :customer_id, :state, :city, :street, :phone) User want to select Customers with Customer.state == USA Address.city == NY. Pretty

[Rails] do I need to seperate admin and user area phsically in my file structure ??

2010-07-20 Thread mac
hii guys!! m new to rails. I am about to create a simple CMS application . Do i need to put my files in seperate folders ?? If doing so how to follow rails convention. I am using scaffold to create my admin end . do I need to change my style...I mean do I need to write them on my own ??. Let me

[Rails] Creating reflective has_and_belongs_to

2010-07-20 Thread Piotr Jacek Puczynski
Hi I have a question is it possible to create the reflective relation with users and friends using has_and_belongs_to. I found this post that is partly connected to my: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/dff2032301961e2d but my issue is join table

[Rails] Re: Re: Model Validations + Urgent

2010-07-20 Thread Hemant Bhargava
Colin Law wrote: On 20 July 2010 14:32, Hemant Bhargava li...@ruby-forum.com wrote: Hello Guys, Thanks for your replies. Yes i want to check the size of file before upload only. I mean first i am checking that file had valid attributes or not. If it has then upload it else dont. Currenly

[Rails] Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Piotr Jacek Puczynski
Thank you for the message, Yes it is some idea for adding and removing friendships. But I still cannot imagine how this model will enable listing for friends of user x. user = User.find(id) comrades = user.friends I think sorted model will not work in that case (it doesn't know in which column

Re: [Rails] Re: Re: Model Validations + Urgent

2010-07-20 Thread Colin Law
On 20 July 2010 14:54, Hemant Bhargava li...@ruby-forum.com wrote: Colin Law wrote: On 20 July 2010 14:32, Hemant Bhargava li...@ruby-forum.com wrote: Hello Guys, Thanks for your replies. Yes i want to check the size of file before upload only. I mean first i am checking that file had

[Rails] Re: sudo rake gems:install

2010-07-20 Thread Robert Walker
Abder-Rahman Ali wrote: I have upgraded to Rails3beta4 from Rails 2.3.8. I used to run the following command for ensuring that gems are installed: sudo rake gems:install Read up on the new Bundler for use with Rails 3. Here's a place to start:

[Rails] Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Marnen Laibow-Koser
Piotr Jacek Puczynski wrote: Thank you for the message, Yes it is some idea for adding and removing friendships. But I still cannot imagine how this model will enable listing for friends of user x. user = User.find(id) comrades = user.friends I think sorted model will not work in that

[Rails] MySQL index question

2010-07-20 Thread Jeffrey L. Taylor
I am trying to speed up some DB operations and perhaps have gone overboard with indexes. Does MySQL usually use only one index per query and simply match keys on the results of the indexed first part? For example: DELETE FROM tokens WHERE 6813946236211560448 = fnv AND fnv 6818449835838930944

RE: [Rails] Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Piotr Jacek Puczynski
OK. I also think the first option is better. However I don't know how to force the model to join based on two columns in join table so that I will be able to write simple 'user.friends' each time I need a friends' list. Do you know how to hack it? Piotr J. Puczyński -Original Message-

[Rails] Re: MySQL index question

2010-07-20 Thread Frederick Cheung
On Jul 20, 3:12 pm, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: I am trying to speed up some DB operations and perhaps have gone overboard with indexes.  Does MySQL usually use only one index per query and simply match keys on the results of the indexed first part?  For example: one one

[Rails] Re: do I need to seperate admin and user area phsically in my file structure ??

2010-07-20 Thread Fernando Perez
I prefer to have separate admin controllers with at the top a before_filter :require_admin to be safe. -- 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

Re: [Rails] Re: MySQL index question

2010-07-20 Thread Jeffrey L. Taylor
Quoting Frederick Cheung frederick.che...@gmail.com: On Jul 20, 3:12 pm, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: I am trying to speed up some DB operations and perhaps have gone overboard with indexes.  Does MySQL usually use only one index per query and simply match keys on the

[Rails] setup not invoked during unit testing

2010-07-20 Thread Andy Joel
I have a bunch of unit test files in a Rails project. One of them has stopped using the setup method before each test, or even if I invoke it in the test itself. After commenting out most of it, here is what is left: require 'test/test_helper' class GlcTest ActiveSupport::TestCase def setup

[Rails] RE: Re: Creating reflective has_and_belongs_to

2010-07-20 Thread Marnen Laibow-Koser
Piotr Jacek Puczynski wrote: OK. I also think the first option is better. However I don't know how to force the model to join based on two columns in join table so that I will be able to write simple 'user.friends' each time I need a friends' list. Do you know how to hack it? See the

[Rails] Re: many to many relations

2010-07-20 Thread Eduard Martini
in authors model: has_one: city_of_birth, :table = cities has_one :city_of_death, :table = cities in authors table: city_of_birth_id, city_of_death_id author instance: @author.city_of_birth @author.city_of_death On Jul 19, 11:59 pm, Solidify max.holtm...@gmail.com wrote: Hi everyone, I have

[Rails] Re: MySQL index question

2010-07-20 Thread Frederick Cheung
On Jul 20, 3:55 pm, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: mysql EXPLAIN EXTENDED SELECT * FROM tokens WHERE 6813946236211560448 = fnv AND fnv 6818449835838930944 AND updated_at'2010-06-20 14:08:55' AND occurrences=0;

Re: [Rails] Re: MySQL index question

2010-07-20 Thread Jeffrey L. Taylor
Quoting Frederick Cheung frederick.che...@gmail.com: On Jul 20, 3:55 pm, Jeffrey L. Taylor r...@abluz.dyndns.org wrote: mysql EXPLAIN EXTENDED SELECT * FROM tokens WHERE 6813946236211560448 = fnv AND fnv 6818449835838930944 AND updated_at'2010-06-20 14:08:55' AND occurrences=0;

[Rails] Re: sudo rake gems:install

2010-07-20 Thread Abder-Rahman Ali
Robert Walker wrote: Abder-Rahman Ali wrote: I have upgraded to Rails3beta4 from Rails 2.3.8. I used to run the following command for ensuring that gems are installed: sudo rake gems:install Read up on the new Bundler for use with Rails 3. Here's a place to start:

[Rails] Re: sudo rake gems:install

2010-07-20 Thread Abder-Rahman Ali
Maybe: sudo rake gems:install is wrong? I mean, there shouldn't be rake here? For Rails 2.3.x at least, as I figured out that we need bundle in Rails3. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] possible?

2010-07-20 Thread Dries
Somebody who think it's possible? -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Get pid of memcached instance my app is connected to?

2010-07-20 Thread Max Williams
Hi all. I'm using memcache-client to connect to memcached in my rails app. I'm having some weirdness on my production server and have several memcached instances running. Is there a way to get the pid of the one that my app is actually connected to? thanks, max -- Posted via

Re: [Rails] setup not invoked during unit testing

2010-07-20 Thread Colin Law
On 20 July 2010 15:57, Andy Joel li...@ruby-forum.com wrote: I have a bunch of unit test files in a Rails project. One of them has stopped using the setup method before each test, or even if I invoke it in the test itself. After commenting out most of it, here is what is left: require

[Rails] Looking for an iPhone + RoR developer

2010-07-20 Thread Radamanthus Batnag
Hi folks, I'm posting this for a friend. The company will be building iPhone apps that talk to an RoR backend. Work will be home-based, San Francisco time. rad --- Iphone App Developer for a Telephony Startup Firm We are seeking a top-caliber, enthusiastic lead iPhone developer to join our

Re: [Rails] possible?

2010-07-20 Thread Colin Law
On 20 July 2010 16:42, Dries steenhouwer.dr...@gmail.com wrote: Somebody who think it's possible? What? Colin -- 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-t...@googlegroups.com. To

Re: [Rails] possible?

2010-07-20 Thread Larry Meadors
On Tue, Jul 20, 2010 at 9:42 AM, Dries steenhouwer.dr...@gmail.com wrote: Somebody who think it's possible? With enough money, it most certainly is. :) Larry -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Where to find Rails3 status updates?

2010-07-20 Thread Dee
I already watch Riding Rails (http://weblog.rubyonrails.org/) feed plus RoR:Talk and RoR:Core on Google Groups. Riding Rails is higher level than I want and hasn't been updated in more than a month. I'd like to get a feel for where the Rails3 project is to make some business decisions, and

[Rails] Combining 2 hash fields in a single database field

2010-07-20 Thread Sachin
Hello Gurus, I have a form which has a phone_no field. I want to provide 3 text fields to user to split and enter the phone number in country_code, state_code and the number which will be contacted and entered in to the phone_no field with some delimiter (-) The same functionality will be for

[Rails] Re: setup not invoked during unit testing

2010-07-20 Thread Frederick Cheung
On Jul 20, 3:57 pm, Andy Joel li...@ruby-forum.com wrote: test_setup does get invoked, so the file is being processed. I am guessing that somewhere there is another setup method that takes priority, but where would it be, and why does it take priority over this one? My IDE recognises that

Re: [Rails] Where to find Rails3 status updates?

2010-07-20 Thread Greg Donald
On Tue, Jul 20, 2010 at 11:05 AM, Dee dger...@gmail.com wrote: and secondarily to be up-to-date about new features as a dev. http://github.com/rails/rails https://rails.lighthouseapp.com/dashboard -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are

[Rails] Re: sortable_element - multiple ajax events

2010-07-20 Thread Ben
So it appears after a bit of reading the best method of dealing with this problem, isn't to deal with it directly. It seems that providing feedback to the user (cursor into a wait state or a showing a spinner) that something is happening is sufficient stop them from doing other actions until it

Re: [Rails] possible?

2010-07-20 Thread Steve Spiller
On 20 July 2010 16:42, Dries steenhouwer.dr...@gmail.com wrote: Somebody who think it's possible? Yes -- 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-t...@googlegroups.com. To

[Rails] Ajax to download a file

2010-07-20 Thread Jonathan Steel
Hi I would like to download a file in an asynchronous manner. From what I have read, I should be using a hidden iframe. How do I connect the AJAX request to the iframe to display the file? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

Re: [Rails] Get pid of memcached instance my app is connected to?

2010-07-20 Thread Marc Byrd
CACHE.stats[:pid] m On Tue, Jul 20, 2010 at 8:46 AM, Max Williams li...@ruby-forum.com wrote: Hi all. I'm using memcache-client to connect to memcached in my rails app. I'm having some weirdness on my production server and have several memcached instances running. Is there a way to get

[Rails] Re: Combining 2 hash fields in a single database field

2010-07-20 Thread Marnen Laibow-Koser
Sachin wrote: Hello Gurus, I have a form which has a phone_no field. I want to provide 3 text fields to user to split and enter the phone number in country_code, state_code and the number which will be contacted and entered in to the phone_no field with some delimiter (-) The same

[Rails] Re: Ajax to download a file

2010-07-20 Thread Marnen Laibow-Koser
Jonathan Steel wrote: Hi I would like to download a file in an asynchronous manner. From what I have read, I should be using a hidden iframe. How do I connect the AJAX request to the iframe to display the file? Thanks This is probably better asked on a JavaScript forum. It certainly has

[Rails] Re: Ajax to download a file

2010-07-20 Thread Jonathan Steel
You're mostly correct, but yes, I will post it somewhere on a javascript board. Marnen Laibow-Koser wrote: Jonathan Steel wrote: Hi I would like to download a file in an asynchronous manner. From what I have read, I should be using a hidden iframe. How do I connect the AJAX request to the

[Rails] render :js = alert('Test !')

2010-07-20 Thread Mamadou Touré
Hi Folks, I use render :js = alert('Test !') in my modele, but instead of having the alert displayed, the browser try to donload a file containing this string : render :js = alert('Test !'). Do you know why I the browser behaves such a way ? Regards -- Posted via http://www.ruby-forum.com/. --

[Rails] Re: render :js = alert('Test !')

2010-07-20 Thread Mamadou Touré
Sorry, in the text before I made a mistake, please read ''in my controller'' instead of ''my model'' -- 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: render :js = alert('Test !')

2010-07-20 Thread Marnen Laibow-Koser
Mamadou Touré wrote: Hi Folks, I use render :js = alert('Test !') in my modele, In your *model*? render doesn't go there. but instead of having the alert displayed, the browser try to donload a file containing this string : render :js = alert('Test !'). Do you know why I the browser

[Rails] Re: render :js = alert('Test !')

2010-07-20 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: Mamadou Touré wrote: Hi Folks, I use render :js = alert('Test !') in my modele, In your *model*? render doesn't go there. OK, just saw your correction. but instead of having the alert displayed, the browser try to donload a file containing this string :

[Rails] Re: named_scope returns Array -- find returns error?

2010-07-20 Thread Seth Willits
It's a pity there's no way to delete threads here. It turned out I had a class method with the same name. *slaps forehead*. Typical. Spend forever finding a bug, ask for help, find the answer yourself soon after! Sorry for the noise. -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: render :js = alert('Test !')

2010-07-20 Thread Mamadou Touré
Marnen Laibow-Koser wrote: Marnen Laibow-Koser wrote: Mamadou Touré wrote: Hi Folks, I use render :js = alert('Test !') in my modele, In your *model*? render doesn't go there. OK, just saw your correction. but instead of having the alert displayed, the browser try to donload a

[Rails] Re: render :js = alert('Test !')

2010-07-20 Thread Marnen Laibow-Koser
Mamadou Touré wrote: [...] Hi Marnen, here is my controller code (the method 'generer' is triggered once a user hit a submit button) I don't see offhand why your render statement isn't working well, but you've got *a lot* of other problems in your code. First of all, the entire method may be

[Rails] Another problem

2010-07-20 Thread Carlos Aldas
I've have another problem, every time I go to another page the flash dissapears, It's like the link changes. I'm using the flash in a layout placed in every page of the system. Can you help me please?! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Prefix a drop-down with Select Item -- Rails way?

2010-07-20 Thread RichardOnRails
Hi, I'm finally a happy developer of a Rails app that's got a working drop- down. In short, I prefixed the array of Vendors (which all have integer IDs 0) with an new Vendor with in ID of 0 and a string Select ... in the field that populates the drop down. I'll use some kind of before command

[Rails] Re: Prefix a drop-down with Select Item -- Rails way?

2010-07-20 Thread Marnen Laibow-Koser
RichardOnRails wrote: Hi, I'm finally a happy developer of a Rails app that's got a working drop- down. In short, I prefixed the array of Vendors (which all have integer IDs 0) with an new Vendor with in ID of 0 and a string Select ... in the field that populates the drop down. I'll use

[Rails] Re: Another problem

2010-07-20 Thread Marnen Laibow-Koser
Carlos Aldas wrote: I've have another problem, every time I go to another page the flash dissapears, It's like the link changes. I'm using the flash in a layout placed in every page of the system. Can you help me please?! Check the generated HTML. Make sure it's pointing to the URL you

Re: [Rails] Re: Prefix a drop-down with Select Item -- Rails way?

2010-07-20 Thread Michael Pavling
On 20 July 2010 20:08, Marnen Laibow-Koser li...@ruby-forum.com wrote: RichardOnRails wrote:     %= f.label :vendor %br /     % @vendors = Vendor.find( :all, :order=nickname ASC) -% As I and others have told you numerous times: STOP DOING DATABASE ACCESS IN THE VIEW.  You should never have

[Rails] Model Associations

2010-07-20 Thread Amit Kumar
Hi, I have just started using rails and i am trying to use IP database to get user location. Here are the database schemas... [code]CREATE TABLE IF NOT EXISTS `ip_group_cities` ( `ip_start` bigint(20) NOT NULL, `location` int(11) NOT NULL, UNIQUE KEY `index_ip_group_cities_on_ip_start`

[Rails] installing ruby on rails

2010-07-20 Thread Rich d
i am trying to install ruby on rails. is ruby gems the best way to go before installing rails since it is a package manager or do I need to install ruby 1.8.7? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

Re: [Rails] Re: Prefix a drop-down with Select Item -- Rails way?

2010-07-20 Thread Dave Aronson
On Tue, Jul 20, 2010 at 15:15, Michael Pavling pavl...@gmail.com wrote: +1 to what Marnen says about keeping the DB out of the view. +another. I would suggest that RichardOnRails brush up on MVC. -Dave -- Specialization is for insects. | Professional: http://davearonson.com -Robert Anson

[Rails] Re: render :js = alert('Test !')

2010-07-20 Thread Mamadou Touré
This should work. In fact, it sounds like it *is* working -- it's sending the text to the browser just like it should. What it may not be doing properly is setting the MIME type. Can you check the MIME type of the response? end Best, -- Marnen Laibow-Koser

Re: [Rails] installing ruby on rails

2010-07-20 Thread Frederick Cheung
On 20 Jul 2010, at 20:44, Rich d elevenb4...@gmail.com wrote: i am trying to install ruby on rails. is ruby gems the best way to go before installing rails since it is a package manager or do I need to install ruby 1.8.7? Rails does require rubygems. Whether or not you want ruby 1.8.7 is

  1   2   >