Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-16 Thread J . Pablo Fernández
Where do you pass that? should validate_uniqueness_of(:email, :allow_blank => true) That doesn't work. That method takes only one argument: /Users/pupeno/.rvm/gems/ruby-1.8.7-p...@lemonfrog/gems/shoulda-2.11.0/lib/shoulda/context.rb:429:in `validate_uniqueness_of': wrong number of arguments (2 f

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
Im not re-installing the mysql gem. I have been using the Ruby based mysql library that used to ship with Rails by default (pre 2.2). If I am to migrate to Rails 2.3 then I HAVE to install the gem now. On Jun 16, 8:58 pm, Hassan Schroeder wrote: > On Tue, Jun 15, 2010 at 1:41 AM, Ram wrote: > >

[Rails] Rails won't execute backticked OS commands

2010-06-16 Thread Greg Willits
I'm at a loss as what to look for... I can issue a command result = `some_os_command_string` on my dev system just fine in both a pur ruby test file, and from Rails in dev mode. When I push that code to my server, the backtick command doesn't work. No failure message -- even if I wrap it in begin

[Rails] Re: Multiple classes on form text_field

2010-06-16 Thread Saurabh Peshkar
Hi Ralph, Have you tried this: <%= f.text_field :x, :class => 's t' %> Regards, Saurabh -- 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-t...@g

[Rails] Beta 4 and Modularized::Controllers

2010-06-16 Thread Yuri
Seems that in beta 4 and master, a route defined in a namespace :foo, or with controller: 'foo/bar', or with scope module: 'foo' always nets one: 'wrong constant name Foo/barController'. Did the ways of setting up routes to controllers in modules change? Or is it perhaps a problem with b4 v. 1.9.2

[Rails] tabular view gem in script/console

2010-06-16 Thread Chamnap
I remember there is a gem on github that is able to display tabular view like mysql console in script/console. Anyone knows, I seem to forget, couldn't find it? Thanks Chamnap -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to t

[Rails] Multiple classes on form text_field

2010-06-16 Thread Ralph Shnelvar
Consider : - - - - <% form_for(@z) do |f| %> <%= f.error_messages %> <%= f.label :x %> <%= f.text_field :x, :class => 's' %> <%= f.submit 'Update' %> <% end %> - - - - The above form works fine. What I want to do is have two classes, s and t, associated with text_fiel

[Rails] Re: passenger and apache mpm's

2010-06-16 Thread Hongli Lai
On Jun 17, 12:47 am, Bruno Sousa wrote: > Hi! > Is it safe to run phusion passenger with all apache kinds of MPM? Prefork and Worker are supported. -- 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 rub

[Rails] passenger and apache mpm's

2010-06-16 Thread Bruno Sousa
Hi! Is it safe to run phusion passenger with all apache kinds of MPM? regards -- 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-t...@googlegroups.c

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-16 Thread Marnen Laibow-Koser
Toby Rodwell wrote: > I have a 'Circuit' table, and a 'Glue' table to perform a many-to-many > join on the circuit records, such at a circuit can have many subcircuits > (its component parts) and many supercircuits (circuits which it itself > is a part of). In other words, you have a hierarchical

[Rails] Recursive self-referential many-to-many relationship

2010-06-16 Thread Toby Rodwell
I have a 'Circuit' table, and a 'Glue' table to perform a many-to-many join on the circuit records, such at a circuit can have many subcircuits (its component parts) and many supercircuits (circuits which it itself is a part of). has_and_belongs_to_many :subcircuits, :class_name => "Circuit"

Re: [Rails] Re: Forcing helper like link_to to use single quotes

2010-06-16 Thread Colin Law
On 16 June 2010 21:01, Greg Donald wrote: > On Wed, Jun 16, 2010 at 2:39 PM, Pale Horse wrote: >> If you want consistency, consistently use double quotations. > > Always using double quotes causes every string to be interpolated, > often when not required.  Single quoted string are not interpolat

[Rails] Re: Calling to_yaml on an array of ActiveRecord objects is producing TypeError: wrong argument type

2010-06-16 Thread Stew Mckinney
I also run into the same error when running Spec tests that trigger Observers, which trigger DelayedJobs. The full stack trace: ruby-1.8.7-p249/lib/ruby/1.8/yaml.rb:391:in `emit' ruby-1.8.7-p249/lib/ruby/1.8/yaml.rb:391:in `quick_emit' ruby-1.8.7-p249/lib/ruby/1.8/yaml/rubytypes.rb:15:in `to_yam

Re: [Rails] Re: Forcing helper like link_to to use single quotes

2010-06-16 Thread Greg Donald
On Wed, Jun 16, 2010 at 2:39 PM, Pale Horse wrote: > If you want consistency, consistently use double quotations. Always using double quotes causes every string to be interpolated, often when not required. Single quoted string are not interpolated, saving CPU cycles. Computer science 101. --

[Rails] Re: Forcing helper like link_to to use single quotes

2010-06-16 Thread Pale Horse
Marnen Laibow-Koser wrote: > > That's not true. The OP seems to be talking about the quotation marks > in the generate HTML, not in the Ruby source code. > > > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org It would appear I've been misguided. -- Posted via ht

[Rails] Re: Forcing helper like link_to to use single quotes

2010-06-16 Thread Marnen Laibow-Koser
Pale Horse wrote: > Sharkie Landshark wrote: >> >> For example, I want rather than >> >> I want to maintain consistency with style. >> >> Can this be done? >> >> Also, I am trying to use Rails 3.0. >> >> Sharkie > > I would not recommend using single quotations over double. One argument > a

[Rails] Re: Forcing helper like link_to to use single quotes

2010-06-16 Thread Pale Horse
Sharkie Landshark wrote: > > For example, I want rather than > > I want to maintain consistency with style. > > Can this be done? > > Also, I am trying to use Rails 3.0. > > Sharkie I would not recommend using single quotations over double. One argument against using single quotes is that y

[Rails] :wrapper_tag, :wrapper_class options (and more) with simple_form and Rails 2.3 ?

2010-06-16 Thread Fro_oo
Hi, I'm making my first Rails project and I'm using the simple_form gem (version 1.0) with a Rails app (version 2.3.5). simple_form repository v=1.0 Is there any way to implement the nice options :wrapper_tag, :wrapper_class, :wrapper_error_class ? Or maybe I'm missing something? :-D Thank you f

[Rails] Re: firebug jQuery undefined message in rails app

2010-06-16 Thread Pale Horse
First, try: "" Instead of "" Else: "javascript_include_tag :all" You can set :recursive => true if you want Rails to search all subdirectories of public/javascripts. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Rub

[Rails] Re: firebug jQuery undefined message in rails app

2010-06-16 Thread Marnen Laibow-Koser
John Merlino wrote: > Does anyone have a step by step instruction on how to remove prototype > completely so jQuery works? Sure: 1. Remove public/javascripts/prototype.js. 2. There is no step 2. > The jRails plugin seems to make them work > together. I want to remove prototype as I will never us

[Rails] Re: ruby/lib/ruby/site_ruby/1.8/rubygems.rb:270:in `activate': u

2010-06-16 Thread Pale Horse
Mamadou Touré wrote: > > Hi folks, > > I'm getting the following error while trying to start the Webrick serve > on a old project that I just checked out from our svn. Could you tell me > what's wrong ? > > ruby/lib/ruby/site_ruby/1.8/rubygems.rb:270:in `activate': undefined > method `map' for ni

[Rails] ruby/lib/ruby/site_ruby/1.8/rubygems.rb:270:in `activate': u

2010-06-16 Thread Mamadou Touré
Hi folks, I'm getting the following error while trying to start the Webrick serve on a old project that I just checked out from our svn. Could you tell me what's wrong ? ruby/lib/ruby/site_ruby/1.8/rubygems.rb:270:in `activate': undefined method `map' for nil:NilClass (NoMethodError) -- Posted v

[Rails] Re: firebug jQuery undefined message in rails app

2010-06-16 Thread John Merlino
Actually stepcarousel.js which uses jquery is working in the application so I don't think there is a conflict with prototype. However I still get the error jquery is undefined. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Group

Re: [Rails] Forcing helper like link_to to use single quotes

2010-06-16 Thread Michael Pavling
On 16 June 2010 18:51, Sharkie Landshark wrote: > For example, I want rather than > > I want to maintain consistency with style. You want to change the correct (according to the xhtml guidelines) double-quotes, to incorrect single quotes? Wouldn't it be better to change the single quotes to d

[Rails] Forcing helper like link_to to use single quotes

2010-06-16 Thread Sharkie Landshark
For example, I want rather than I want to maintain consistency with style. Can this be done? Also, I am trying to use Rails 3.0. Sharkie -- 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 p

[Rails] [Share] How To Upgrade Rails 2 Become Rails 3

2010-06-16 Thread Yacobus Reinhart
Hi: I just want share for every body here how to upgrade your application from rails 2 become rails 3, like i did before. I hope it will be useful for you guys, any question or advice please post here : http://www.reinhartlab.com/2010/06/how-to-upgrade-to-rails-3-of-your-old.html Reinhart -- Po

[Rails] Re: firebug jQuery undefined message in rails app

2010-06-16 Thread John Merlino
Does anyone have a step by step instruction on how to remove prototype completely so jQuery works? The jRails plugin seems to make them work together. I want to remove prototype as I will never use it. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: Mac and Rails

2010-06-16 Thread Kayle
There are some wonderful guides out there for this. Rails works great out-of-the-box on OS X. Out of the editors I've used, I believe textmate is the best. It's visually pleasing and very extensible. It also is the text editor seen in the famous "Rails Casts" from 37Signals. http://macromates.com/

[Rails] firebug jQuery undefined message in rails app

2010-06-16 Thread John Merlino
In rails app, I add the following line of code in application.js and I get jQuery is not defined in firebug console. In application.html.erb, I have the following: and I installed jquery in public/javascripts Any ideas what's going wrong? thanks for reply. (function($) { var linksToInt =

[Rails] Re: How to use an active record store session model?

2010-06-16 Thread Garth
Let me know if you figure this out - I'm having the same problem. -- Garth -- 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

Re: [Rails] Re: URL Hiding

2010-06-16 Thread Philip Hallstrom
On Jun 16, 2010, at 9:28 AM, JuKuen wrote: > The idea is generating url`s which will hide what is the database used > to store the information and hiding the server side language wrapper. > example: > http://www.amazon.com/gp/product/1934356166/ref=s9_simv_bw_p14_i2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 18:07, Michael Pavling wrote: > On 16 June 2010 16:45, Ants Pants wrote: > > As I have said before, I have no problems with all of that but thanks for > > the suggestions. > > To be honest, I don't really understand what you're asking for help > with. If you can state your positi

Re: [Rails] Re: URL Hiding

2010-06-16 Thread Michael Pavling
On 16 June 2010 17:28, JuKuen wrote: > The idea is generating url`s which will hide what is the database used > to store the information and hiding the server side language wrapper. What do *your* URLs look like now that gives away the DB and server-side language? -- You received this message b

[Rails] Re: Rails 3: link_to with "data-confirm"

2010-06-16 Thread Ray Parker
Did you find a solution to this? I just hit this myself last night and have spent a few hours trying to find an answer. -- 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, se

[Rails] Re: URL Hiding

2010-06-16 Thread JuKuen
The idea is generating url`s which will hide what is the database used to store the information and hiding the server side language wrapper. example: http://www.amazon.com/gp/product/1934356166/ref=s9_simv_bw_p14_i2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-4&pf_rd_r=0QDPNRG9W6H5YTMMF2G9&pf_rd_t=101&pf_

Re: [Rails] Field validation

2010-06-16 Thread Colin Law
On 16 June 2010 11:34, Stanislav Orlenko wrote: > Hi > I have a field called "cost": > > <%= f.text_field :cost, :size=>2, :maxlength=>4 %> > > I want to check that user enter numeral value and this value is integer > > In post.rb (model): > >    def cost_validate_int >      errors.add_to_base("Er

Re: [Rails] Re: form select not saving to the database

2010-06-16 Thread Colin Law
On 16 June 2010 09:40, Pale Horse wrote: > Marnen Laibow-Koser wrote: >> the batman wrote: >>> <%= f.label :type %> >>> <%= f.select(:type, ["original","print","other"]) %> >>> >>> I have a photos model and added a drop-down list to the form, when the >>> option is selected, the correct parameters

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Michael Pavling
On 16 June 2010 16:45, Ants Pants wrote: > As I have said before, I have no problems with all of that but thanks for > the suggestions. To be honest, I don't really understand what you're asking for help with. If you can state your position in different terms, because what you've said so far obvi

Re: [Rails] mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Hassan Schroeder
On Tue, Jun 15, 2010 at 1:41 AM, Ram wrote: > Ive got Mac OS X Leopard (10.5.8), ruby 1.8.6 (2009-06-08 patchlevel > 369) [universal-darwin9.0] and mysql 5.0.67 installed and working fine > with Rails 2.1.0. > Im trying to upgrade my Rails apps to 2.3.5 but when i try to install > the mysql gem

[Rails] Re: class methods from module where active rec is involved

2010-06-16 Thread Jedrin
oops, I needed to do self.primary_key = 'something' On Jun 16, 11:43 am, Jedrin wrote: >  I have a module as shown below and when I extend an active record to > use it, I can not access the > primary_key method. In a simple test program using a similar approach > where active record is not invol

[Rails] Re: class methods from module where active rec is involved

2010-06-16 Thread Jedrin
oops, I needed to do self.primary_key = 'something' On Jun 16, 11:43 am, Jedrin wrote: >  I have a module as shown below and when I extend an active record to > use it, I can not access the > primary_key method. In a simple test program using a similar approach > where active record is not invol

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 16:57, Michael Pavling wrote: > On 16 June 2010 15:51, Ants Pants wrote: > > I don't have a problem with comparing floats, but I might need to find > the > > 10 closest times to the actual event time and 4 of those times could be > less > > than the actual event time and 6 could

[Rails] class methods from module where active rec is involved

2010-06-16 Thread Jedrin
I have a module as shown below and when I extend an active record to use it, I can not access the primary_key method. In a simple test program using a similar approach where active record is not involved, access to the class methods seems to work ok. What can I do to make this work or so that I c

[Rails] Re: Rails 3 link_to :remote

2010-06-16 Thread Matt Royer
Update for anyone that needs help in this area. I found my problem. You might have to do the same (if you are using this function the way I am). In my controller, I don't know why I put this in the Index action before. It is now in the SHOW (duh) action: format.js { render(:update) {|pag

Re: [Rails] Learning RoR

2010-06-16 Thread Juan Pablo Genovese
If you are new to Ruby too, don't forget to take a look at "The Well Grounded Rubyist". It's an awesome book. 2010/6/15 Ryan Kneer > Hey. I'm just getting into RoR and was hoping someone could direct me > to the best learning resources. > > P.S.: I took a couple computer sciences courses in uni

[Rails] Re: how to call a function after 10 minutes or second?

2010-06-16 Thread Robert Walker
Vuong Hung wrote: > Hi all, > > I have a problem. > > I want to call some function after every 10 minutes. But I don't it. Please provide more detail. Are you asking about server-side or client-side? If you are asking about server-side there are options like delayed_job: http://github.com/col

Re: [Rails] Learning RoR

2010-06-16 Thread DK
Try the book Agile Web Development with Rails. If you go through the tutorial you will have a foundation. On 6/15/10, Ryan Kneer wrote: > Hey. I'm just getting into RoR and was hoping someone could direct me > to the best learning resources. > > P.S.: I took a couple computer sciences courses in

[Rails] Re: Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax

2010-06-16 Thread Me
Easiest would be to make the select a partial and update the partial based on the object sent to the query. You make an ajax call when an item is selected, query the db, replace the select you want to update with the partial with the items scoped for the parent object. On Jun 16, 9:11 am, Ian Irv

Re: [Rails] Re: URL Hiding

2010-06-16 Thread Hassan Schroeder
On Wed, Jun 16, 2010 at 12:52 AM, JuKuen wrote: > Someting like Amazon`s strings, which are generating as url`s. I still have no idea what you're talking about. Maybe you could provide an actual example, or explain what goal you are trying to achieve? -- Hassan Schroeder --

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Michael Pavling
On 16 June 2010 15:51, Ants Pants wrote: > I don't have a problem with comparing floats, but I might need to find the > 10 closest times to the actual event time and 4 of those times could be less > than the actual event time and 6 could be higher. As a starting point, IIWM I would: * Get the t

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Andy Jeffries
> > If you have two floating point values representing seconds (and parts of) >> why can't you just compare the two floating point values? >> >> What part are you stuck with? Can you give us some code with a comment on >> which bit you can't do. >> > >> I don't have a problem with comparing floats

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
On 16 June 2010 15:54, Andy Jeffries wrote: > These values are then converted to seconds and stored as decimal in the DB >> (I allow fractions of a second, too (tenth, hundredth, millisecond). when >> they are retrieved form the DB, I convert the seconds to a string format of, >> for example, 01:

Re: [Rails] Senior Ruby on Rails Developer Needed! Can you help?

2010-06-16 Thread Michael Pavling
On 16 June 2010 13:01, Paul wrote: > Can you help?!?! Can you supply some more information before we waste your time with our CVs... Where is this job? This list has an international membership. Is telecommuting acceptable? Is it a permanent or contract job? How much (ball-park even) is the re

[Rails] Re: Install Plugins into vendor/plugins

2010-06-16 Thread Ian Irving
installing in the vendor/plugins (not app ) directory is done with the use "script/plugin" using "script/plugin -h" will get you full help generally you install from a known a subversion URL: plugin install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder or you install a p

[Rails] Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax

2010-06-16 Thread Ian Irving
Cascading Drop Down Selection Lists are when the value of a second drop down are filtered based on the values a first field (usually a drop down, but could be a radio box, check box or even text) Select a Country and then State or Province; or Select a Car Manufacture and then a Car Model. This

[Rails] Senior Ruby on Rails Developer Needed! Can you help?

2010-06-16 Thread Paul
Can you help?!?! Are you considering a career move at the moment? Would you be interested working for one of the world's leading mobile organisations? Are you looking for a web development role that will impact millions of people? I have one of my largest clients, a global mobile telecommunicatio

Re: [Rails] Re: database.yml host read from yml

2010-06-16 Thread Chris Habgood
Ok, in my load_config I do this: Site = YAML.load_file(File.join(RAILS_ROOT, 'config', 'sites.yml')) Something like this in the database.yml? host: <%= Site['name']['db'] %> On Wed, Jun 16, 2010 at 03:26, Frederick Cheung wrote: > > > On Jun 14, 6:50 pm, Me wrote: > > I have a yml file with i

Re: [Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Andy Jeffries
> > These values are then converted to seconds and stored as decimal in the DB > (I allow fractions of a second, too (tenth, hundredth, millisecond). when > they are retrieved form the DB, I convert the seconds to a string format of, > for example, 01:39:11 (from 5951 seconds). If fractions are use

[Rails] Re: Different each iteration

2010-06-16 Thread Pale Horse
Marnen Laibow-Koser wrote: > > There's also in_groups_of. > > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org I'd forgotten about that method. In addition, you can each_slice(integer) to divide an array. Though, 'enumerator' is required in your Active Record mod

[Rails] Re: Different each iteration

2010-06-16 Thread Marnen Laibow-Koser
Pale Horse wrote: > Greg Ma wrote: >> Hi, >> I've read a few days ago that rails has a each method that allows you to >> speficy the number of iteration. I think the default number was 1000. >> What is the name of the method? >> >> myList.each_with_something or myList.each_something >> >> Greg >

[Rails] Re: Problem submiting value, form_for, link-to-remote, javascrip

2010-06-16 Thread Neil Bye
Neil Bye wrote: > This is my form. It creates a comment in the database but won't pass the > 'body' value. I think the problem is passing the variable to javascript. > Can anyone help? > > <% form_for :comment, :url=>story_comments_path(@story), :name => > 'form' do |form| %> > >Commen

[Rails] Re: I installed rails 3 and how to install rails 2

2010-06-16 Thread Ugis Ozols
You can install any rails version like this: gem install rails - v=2.3.8 ...and to generate app with specific version do like this: rails _2.3.8_ app_name On Jun 16, 10:02 am, karnati kiran wrote: > Hi all, > > i installed rails 3 and how to install rails 2 in the  same machine please > help me >

[Rails] Re: Newbie trying to set up rails with MySQL

2010-06-16 Thread gezope
Yep, my problems was almost the same! And still not workable with mysql, I don"t know why. Please let me know if you have useful answer! Thnaks, gezope On jún. 15, 23:13, Sarah Faulkner wrote: > Hello -- > > Please pardon my newness -- I'm just getting started with rails, and > I'm having some di

[Rails] Off Topic Advice Needed (Time objects)

2010-06-16 Thread Ants Pants
I know this is a Ruby question but I'm not on any Ruby mailing lists and it's for a Rails project (so might come under select_time etc. ;) ) I thought I'd try here. A user can choose integer values from select drop down boxes to predict how long an event will take. Obvious values are secs (0-59),

[Rails] Re: Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Pale Horse
Deirdre Shell wrote: > > PH, Thank you for the reply. I am trying to assess how available A/Ps > will be hence this question. What's API mean here? The company already > use RoR, they are looking for more developers, that's where I have come > in. > > Deirdre Firstly, the availability of Ro

[Rails] Re: Field validation

2010-06-16 Thread Stanislav Orlenko
Pale Horse wrote: > Stanislav Orlenko wrote: >> >> Can I in some way check cost value in model (value should be numeral and >> integer)? >> >> Thanks in advance! > > validates_numericality_of? I use errors.add_to_base because I don't want to show field's name in the error message(i. e. Cost bla

[Rails] Re: Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Deirdre Shell
PH, Thank you for the reply. I am trying to assess how available A/Ps will be hence this question. What's API mean here? The company already use RoR, they are looking for more developers, that's where I have come in. Deirdre Pale Horse wrote: > Deirdre Shell wrote: >> >> Hi All, >> >> I w

Re: [Rails] Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Michael Pavling
On 16 June 2010 11:37, Deirdre Shell wrote: > I would like your advice.  I'm helping a young company set up a ROR team > from entry level to Senior A/P. Firstly, I'd query why there has been a choice of any technology platform without anyone of experience to decide? Normally, I'd expect the CTOs

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-16 Thread Ram
:S Im not comfortable uninstalling everything and installing it from scratch again. Dont want to lose my existing setup. Pointers from anyone at all? On Jun 15, 1:52 pm, Ram wrote: > I also get this warning in the very beginning of the gem install. Does > it have any relevance? > > WARNING:  In

[Rails] Re: how to call a function after 10 minutes or second?

2010-06-16 Thread Pale Horse
Vuong Hung wrote: > Hi all, > > I have a problem. > > I want to call some function after every 10 minutes. But I don't it. JavaScript functions can be used for this effect in most instances. Though it depends on which function you want to execute, of course. -- Posted via http://www.ruby-forum

Re: [Rails] Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Amala Singh
"If a CS grad, is it difficult to pick up - how long would you think it takes to become proficient?" It will be very difficult if you are just a CS grad. ROR is a framework of whole set of web technologies. So, it will be very difficult to master it in less than 6 months. You need a strong web

[Rails] Re: Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Pale Horse
Deirdre Shell wrote: > > Hi All, > > I would like your advice. I'm helping a young company set up a ROR team > from entry level to Senior A/P. I've not worked with this tech before so > have some basic questions. > > What are your thoughts: > Is this a well exploited technology in Scotland/UK? >

[Rails] how to call a function after 10 minutes or second?

2010-06-16 Thread Vuong Hung
Hi all, I have a problem. I want to call some function after every 10 minutes. But I don't it. -- 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-t

[Rails] Re: Field validation

2010-06-16 Thread Pale Horse
Stanislav Orlenko wrote: > > Can I in some way check cost value in model (value should be numeral and > integer)? > > Thanks in advance! validates_numericality_of? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Re: How to get data from DOM Source other website?

2010-06-16 Thread Vuong Hung
Amar Daxini wrote: > Vuong Hung wrote: >> Hi, everybody. >> >> I am newbie RoR. >> >> I want to get all data from DOM Source of website. >> >> Can you guide me the way to use REXML? I have ready installed lib-xml >> library but I only use XML::Parser. I don't understant it. >> >> Thanks a lot a

[Rails] Ruby on Rails Analyst/Programmers, Glasgow.

2010-06-16 Thread Deirdre Shell
Hi All, I would like your advice. I'm helping a young company set up a ROR team from entry level to Senior A/P. I've not worked with this tech before so have some basic questions. What are your thoughts: Is this a well exploited technology in Scotland/UK? What's the typical career path for an Ro

[Rails] Field validation

2010-06-16 Thread Stanislav Orlenko
Hi I have a field called "cost": <%= f.text_field :cost, :size=>2, :maxlength=>4 %> I want to check that user enter numeral value and this value is integer In post.rb (model): def cost_validate_int errors.add_to_base("Error message") unless cost.is_a?(Fixnum) puts "### #{cost}:

[Rails] Re: before_filter exception being ignored

2010-06-16 Thread Pale Horse
The problem was that customer resource map in my routes file had no :only option specified. Problem solved. -- 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 r

[Rails] Re: Newbie trying to set up rails with MySQL

2010-06-16 Thread rtacconi
I did the same for XP, I installed 5.0 This link my give some additional help: http://stackoverflow.com/questions/1557267/mysql-driver-for-rails-in-windows-7-x64 JRuby works without any problem (at least with XP) since is using the Jdbc adapter, but probably you want to use C Ruby. The problem i

[Rails] Re: How to get data from DOM Source other website?

2010-06-16 Thread Amar Daxini
Vuong Hung wrote: > Hi, everybody. > > I am newbie RoR. > > I want to get all data from DOM Source of website. > > Can you guide me the way to use REXML? I have ready installed lib-xml > library but I only use XML::Parser. I don't understant it. > > Thanks a lot and looking forward. Use Hprico

[Rails] Re: redirect_to :controller=>'tips', :action => 'show'

2010-06-16 Thread Frederick Cheung
On Jun 11, 11:15 pm, John Useast wrote: >   hi, > > I tried to redirect rails to show action by passing controller, action, > and params. However, rails ignores the name of action totally! > > what I got ishttp://mysite/controllername/paramId > With a normal set of restful routes (ie if you've

[Rails] Re: Getting note only the class instances but also instances of subclasses on a has_many associations

2010-06-16 Thread gamov
I ran into problem when I wanted to mass assign via the association. The class of the new object will be of the topclass. The solution is here: http://stackoverflow.com/questions/1601739/rails-attr-accessible-does-not-work-for-type and in your form, use :type_helper On Jun 16, 1:07 am, gamov wr

[Rails] Re: redirect_to :controller=>'tips', :action => 'show'

2010-06-16 Thread Amar Daxini
John Useast wrote: > > hi, > > I tried to redirect rails to show action by passing controller, action, > and params. However, rails ignores the name of action totally! > > what I got is http://mysite/controllername/paramId > > > def update > @tip = current_user.tips.find(params[:id]) >

[Rails] Re: RoutingError

2010-06-16 Thread Amar Daxini
Aashish Kiran wrote: > hi, can anyone help me. i want to create an url to invoke create action > of a controller. routes.rb has the routes. But i am getting error at > line 23. i have @user variable. > > user_contact_path(@user.id) > I want generate url as : users/3/contacts to invoke contacts >

[Rails] Re: Store objects in sessions

2010-06-16 Thread Hans
My fault I did not realized that My use vase is that I refactored some code as à service object. That object is a parser and I would like to use the initialize methods to simplify the use of instance variables in different methods As i understand your suggestion it would be ok to call a new instanc

[Rails] Re: form select not saving to the database

2010-06-16 Thread Pale Horse
Marnen Laibow-Koser wrote: > the batman wrote: >> <%= f.label :type %> >> <%= f.select(:type, ["original","print","other"]) %> >> >> I have a photos model and added a drop-down list to the form, when the >> option is selected, the correct parameters are passed but it is not >> saved to the databas

[Rails] Re: collection_select question

2010-06-16 Thread Pale Horse
Marnen Laibow-Koser wrote: > Bee Dubya wrote: >> Hello! >> >> New to ruby on rails, so I hope this isn't a stupid question (great way >> to start a post ;)). Basically I'm trying to avoid making a bunch of >> different columns in my db table by having my collection_select >> concatenate the ID val

[Rails] Re: Different each iteration

2010-06-16 Thread Pale Horse
Greg Ma wrote: > Hi, > I've read a few days ago that rails has a each method that allows you to > speficy the number of iteration. I think the default number was 1000. > What is the name of the method? > > myList.each_with_something or myList.each_something > > Greg You can specify the batch_siz

[Rails] Re: database.yml host read from yml

2010-06-16 Thread Frederick Cheung
On Jun 14, 6:50 pm, Me wrote: > I have a yml file with ip info.  When I try to do " host:  Site['name'] > ['ip']  it is getting interpreted directly and it is saying Bad URI: > Site['name']['ip'] > > How do I get the database yml to interpret the Site constant?  I can > see the hash in the conso

Re: [Rails] Different each iteration

2010-06-16 Thread Michael Pavling
On 16 June 2010 09:19, Greg Ma wrote: > myList.each_with_something or myList.each_something Do you mean the "each_slice" method of enumerable? http://ruby-doc.org/core/classes/Enumerable.html -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr

Re: [Rails] Learning RoR

2010-06-16 Thread Ivan Nastyukhin
http://guides.rubyonrails.com/ hi, its will be help u) Ivan Nastyukhin dieinz...@me.com On Jun 16, 2010, at 3:13 AM, Ryan Kneer wrote: > Hey. I'm just getting into RoR and was hoping someone could direct me > to the best learning resources. > > P.S.: I took a couple computer sciences cours

[Rails] Re: Rails authentication from non-web interface

2010-06-16 Thread Vaswani
Yeah, I am working on exactly similar project and using http basic auth over https. Though what is the best way to disable cookies and session management in rails as these are not required in the above approach. Thanks Gopal On Jun 15, 4:45 am, Rick DeNatale wrote: > On Mon, Jun 14, 2010 at 8:12

[Rails] Re: RoutingError

2010-06-16 Thread Agoofin
What do you have in your routes.rb file to setup the custom route? http://guides.rubyonrails.org/routing.html On Jun 15, 11:27 am, Aashish Kiran wrote: > hi, can anyone help me. i want to create an url to invoke  create action > of a controller. routes.rb has the routes. But i am getting error a

[Rails] Learning RoR

2010-06-16 Thread Ryan Kneer
Hey. I'm just getting into RoR and was hoping someone could direct me to the best learning resources. P.S.: I took a couple computer sciences courses in university (learned some Java and C++). Cheers, Ryan -- You received this message because you are subscribed to the Google Groups "Ruby on R

Re: [Rails] Different each iteration

2010-06-16 Thread Ivan Nastyukhin
does u speak about it ? http://api.rubyonrails.org/classes/ActiveRecord/Batches/ClassMethods.html Ivan Nastyukhin dieinz...@me.com On Jun 16, 2010, at 12:19 PM, Greg Ma wrote: > Hi, > I've read a few days ago that rails has a each method that allows you to > speficy the number of iteration

[Rails] modifying an association during inheritance

2010-06-16 Thread Chris Kilmer
I have a Team class that inherits from a Group class. Both Team and Groups have memberships through the same association. However, I need to run a method after a Team memberships is added but not a Group. I currently have something like this: class Group < ActiveRecord::Base has_many :members

[Rails] Different each iteration

2010-06-16 Thread Greg Ma
Hi, I've read a few days ago that rails has a each method that allows you to speficy the number of iteration. I think the default number was 1000. What is the name of the method? myList.each_with_something or myList.each_something Greg -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: before_filter exception being ignored

2010-06-16 Thread Pale Horse
Mamadou Touré wrote: > Hello, > > Could we have a look on your .rhtml, to make sure that the action that is > triggered by the link is the good one ? customers/forgotten_password.html.erb: http://pastie.org/1006510 customer_sessions/new.html.erb: http://pastie.org/1006513 -- Posted via http:/

Re: [Rails] I installed rails 3 and how to install rails 2

2010-06-16 Thread Ivan Nastyukhin
simplify - u can use rvm or create link to /rails-2.3.8/bin/rails some thinks like this to /usr/local/bint/rails2 Ivan Nastyukhin dieinz...@me.com On Jun 16, 2010, at 11:02 AM, karnati kiran wrote: > Hi all, > > i installed rails 3 and how to install rails 2 in the same machine please

Re: [Rails] Routing Error in rails 3.0

2010-06-16 Thread Ivan Nastyukhin
hi show your routes please Ivan Nastyukhin dieinz...@me.com On Jun 16, 2010, at 10:31 AM, karnati kiran wrote: > Hi All, > > > $rails g controller Pages home contact > > then, I go to http://localhost:3000/pages/home > > I got > > Routing Error > > No route matches "/pages/contact" >

  1   2   >