[Rails] Re: how to handle error message when condition break both presence and numerical validation ?

2013-01-16 Thread Priya D.
Try giving the following. validates :age, :numericality = true, :allow_nil = true This validation will not be invoked if the age is not present. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Re: how to handle error message when condition break both presence and numerical validation ?

2013-01-16 Thread Fahim Patel
Thanks It works... Best Regards Fahim On Wednesday, January 16, 2013 1:40:38 PM UTC+5:30, Ruby-Forum.com User wrote: Try giving the following. validates :age, :numericality = true, :allow_nil = true This validation will not be invoked if the age is not present. -- Posted via

Re: [Rails] javascript flash messages gem?

2013-01-16 Thread Antonio Tapiador del Dujo
Thanks for the pointer Dheeraj. However, this is not what I was asking for. We already have this in our server-side views. What I am looking for is a javascript for creating them in client-side. El 15/01/13 17:42, Dheeraj Kumar escribió: Clearly, you're too lazy to even search for it.

Re: [Rails] javascript flash messages gem?

2013-01-16 Thread Antonio Tapiador del Dujo
This is what I am looking for :-) El 15/01/13 17:42, Johnneylee Rollins escribió: Hey, I would suggest probably wrapping this thing up with some javascript assets to give you access to an object you can call to say Give me them messages. Think about using an engine. ~Johnneylee On Tue,

Re: [Rails] Re: Ruby e Grafos

2013-01-16 Thread thiagocifani
He wants a library or api in ruby to handle graphs in a interactive way, so the user can manange them in the screen and other basic things. He wants to use it as part of his final work at college. 2013/1/16 Fahim Patel pafa...@gmail.com Can u please write issue in English. On Wednesday,

[Rails] how to show different markers for current location and nearby locations in gmaps4rails

2013-01-16 Thread rubyonrailsworld
Hai guys, Iam using gmaps4rails to show gmaps in my application.iam getting the map pointa right but iam unable to differentiate the current location and nerby locations in my map.my idea is to use different markers for two locations i did it in the following way but it didnt worked for

[Rails] Re: Ruby e Grafos

2013-01-16 Thread luiz danin
I need information. I wonder if Ruby api THERE IS A paragraph Draw graphs iteratively moving the same, that uses javascript. thank you very much. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Job for Ruby On Rails

2013-01-16 Thread Anup Pathak
Hi, Greetings from WinfoGlobal !! WinfoGlobal Technologies is one of the leading Staffing Service Providers based out of Bangalore, India. We have proven track record in fulfilling complex business requirements of our esteemed clients. Currently we have multiple requirement for *Ruby on Rails*

[Rails] Highload project on RoR

2013-01-16 Thread Vitaly Zemlyansky
I need advice about What is the best practice to scale RoR project ? My current stack is: - Ruby 1.9.3 - RoR 3.2.8 - Redis DB for caching and some hot data - PostgreSQL - Resque for background jobs I am expecting a highload for my project for several month. And I need to

Re: [Rails] Re: [JOBS] Seeking rockstar junior RoR dev for a startup [remote/London]

2013-01-16 Thread Vinicius Teles Bezerra
Really great i am interested what have to be done to work in this start up? 2013/1/15, rubyonrailswo...@gmail.com rubyonrailswo...@gmail.com: Hai sir , This is hari krishna from India at present iam working as junior application developer in exleaz software solutions hyderabad iam interested

[Rails] Need help understanding how to add and/remove objects within nested form / Rails Mentor Needed

2013-01-16 Thread RJD
Hi, I posted this question on stackoverflow and figured I would post here as well. http://stackoverflow.com/questions/14348974/need-help-understanding-how-to-add-and-remove-objects-within-nested-form I'm basically looking for 2 things: 1. Any guidance I can get regarding this question. 2. A

[Rails] Re: Need help understanding how to add and/remove objects within nested form / Rails Mentor Needed

2013-01-16 Thread Frederick Cheung
On Wednesday, January 16, 2013 8:49:52 AM UTC, RJD wrote: Hi, I posted this question on stackoverflow and figured I would post here as well. http://stackoverflow.com/questions/14348974/need-help-understanding-how-to-add-and-remove-objects-within-nested-form I'm basically looking for 2

Re: [Rails] Highload project on RoR

2013-01-16 Thread Peter Hickman
The first question is where is this load going to hit your system. No point boosting Redis if PostgreSQL is the problem, no point booting PostgreSQL if the server is under powered. You could waste a lot of time and effort if you don't measure the problem first. -- You received this message

Re: [Rails] Highload project on RoR

2013-01-16 Thread Vitaly Zemlyansky
Currently, I don't have problems. As I wrote, I am just expecting that most problems will be with DB's. I read about this problems in architecture of highload projects. And I know that relational model can't scale for millions simultaneously requests. All projects use distributed DB for this

Re: [Rails] Highload project on RoR

2013-01-16 Thread Peter Hickman
On 16 January 2013 16:06, Vitaly Zemlyansky vitozem...@gmail.com wrote: Currently, I don't have problems. As I wrote, I am just expecting that most problems will be with DB's. I read about this problems in architecture of highload projects. And I know that relational model can't scale for

[Rails] Facebook login on mobile app through a rails app

2013-01-16 Thread Vitor HP
Hi folks. I'm building a rails app that provides an api for a mobile app. The mobile app requires the user to login through his facebook account. My question is about who should be responsible for requesting the login. The mobile app or the rails app. -- You received this message because you

[Rails] Re: STI, #update_attributes and validations.

2013-01-16 Thread Emily S
Why are you doing b = A.find(b-id) and not b = B.find(b-id) ? I think it would be better if you did b = B.find(b-id) c = b.becomes(C) try it in the console and verify that c.class is C then you should be able to do c.update_attributes(:attribute_x = 'present', :attribute_y = 'present') Your

Re: [Rails] sql performance

2013-01-16 Thread Dave Aronson
On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT `hours`.* FROM `hours` WHERE `hours`.`id` = 189 LIMIT 1 That sounds like you could benefit from a .includes on your initial load.

[Rails] How would I model has_many and also mark one of the 'many' as special?

2013-01-16 Thread Walter Lee Davis
I have an Image class with belongs_to :attachable, :polymorphic = true Titles can have Images, and so can People. In the Person class, I have the apposite relationship: has_many :images, :as = :attachable, :dependent = :destroy accepts_nested_attributes_for :images, :reject_if = lambda {

Re: [Rails] Pg_Search gem for advance search is parameter is present

2013-01-16 Thread Dave Aronson
On Tue, Jan 15, 2013 at 5:20 PM, Jean josor...@gmail.com wrote: def self.advsearch(summary_description, specialties, place, study, course, language) end As you can imagine the parameters could be present all of them, none of them or some of them I would advise you make each of them a

Re: [Rails] How would I model has_many and also mark one of the 'many' as special?

2013-01-16 Thread Dave Aronson
On Wed, Jan 16, 2013 at 4:09 PM, Walter Lee Davis wa...@wdstudio.com wrote: I would like to mark one image as being the portrait for this person, I'd suggest adding that a person has_one portrait, class_name: :Image. In the UI you can have them select one of their Images (or none). -Dave --

Re: [Rails] How would I model has_many and also mark one of the 'many' as special?

2013-01-16 Thread Walter Lee Davis
On Jan 16, 2013, at 4:16 PM, Dave Aronson wrote: On Wed, Jan 16, 2013 at 4:09 PM, Walter Lee Davis wa...@wdstudio.com wrote: I would like to mark one image as being the portrait for this person, I'd suggest adding that a person has_one portrait, class_name: :Image. In the UI you can have

Re: [Rails] How would I model has_many and also mark one of the 'many' as special?

2013-01-16 Thread Walter Lee Davis
On Jan 16, 2013, at 4:09 PM, Walter Lee Davis wrote: I have an Image class with belongs_to :attachable, :polymorphic = true Titles can have Images, and so can People. In the Person class, I have the apposite relationship: has_many :images, :as = :attachable, :dependent = :destroy

Re: [Rails] How would I model has_many and also mark one of the 'many' as special?

2013-01-16 Thread Walter Lee Davis
On Jan 16, 2013, at 4:23 PM, Walter Lee Davis wrote: On Jan 16, 2013, at 4:16 PM, Dave Aronson wrote: On Wed, Jan 16, 2013 at 4:09 PM, Walter Lee Davis wa...@wdstudio.com wrote: I would like to mark one image as being the portrait for this person, I'd suggest adding that a person

[Rails] Rails 3.2 jQuery JSONP request not working - Moved Permanently

2013-01-16 Thread Erwin
I am trying to send a POST request ( 'remove_tag_named' )and getting a simple OK back on success ; it doesn't work.. the post is correctly sent , but after then it's looping on sending a GET request to the same url, with the error 301 Moved Permanently I should not be far fro the solution,

[Rails] Re: Rspec Test Failing?

2013-01-16 Thread fuzzy
I just read that Capybara does not do integration testing ... this I found right at the bottom of the Capybara documentation page. So since all Capybara tests reside in the spec/features folder, I moved the submitting a PUT request to the Employees#update test into the

Re: [Rails] sql performance

2013-01-16 Thread Norm Scherer
On 01/16/2013 02:04 PM, Dave Aronson wrote: On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT `hours`.* FROM `hours` WHERE `hours`.`id` = 189 LIMIT 1 That sounds like you could

Re: [Rails] sql performance

2013-01-16 Thread Jordon Bedwell
On Wed, Jan 16, 2013 at 5:22 PM, Norm Scherer normsche...@earthlink.net wrote: On 01/16/2013 02:04 PM, Dave Aronson wrote: On Tue, Jan 15, 2013 at 5:25 AM, Werner webagentur.la...@googlemail.com wrote: Form entries are stored but on reload it gives me tons of: CACHE (0.0ms) SELECT

[Rails] Re: Need help even generating a new app

2013-01-16 Thread Josh Aronoff
Ok cool... Ugh, this permissions thing is driving me nuts. Can I just uninstall everything by deleting all the directories and re running the ruby and rails instals using either homebrow or rvm? to be clear, I'm only saying delete the ruby directory in my Library. -- Posted via

[Rails] how to show different markers for current location and nearby locations in gmaps4rails

2013-01-16 Thread hari krishna
Hai guys, Iam using gmaps4rails to show gmaps in my application.iam getting the map pointa right but iam unable to differentiate the current location and nerby locations in my map.my idea is to use different markers for two locations i did it in the following way but it didnt worked for me my

Re: [Rails] Highload project on RoR

2013-01-16 Thread Vitaly Zemlyansky
Thanks Peter for answering me. The requests mostly will be the reads, approximately 70/30. And I also thought about Erlang. But I don't want to lose benefits from Ruby and RoR. What I want to create is some hybrid system with several languages. For example, Twitter still using RoR, but for