[Rails] Re: :with_disabled attribute

2013-04-27 Thread Frederick Cheung
On Friday, April 26, 2013 11:35:39 AM UTC+1, Ruby-Forum.com User wrote: I'm newbie to RoR, can anybody explain what is the purpose of :with_disabled = true in I don't think that exists at all as an option on belongs_to. What makes you think it should exist? The only similarly named thing

[Rails] required field for one, optional for another

2013-04-27 Thread Soichi Ishida
rails 3.2.11 My app has User model, its one of the fields is entrepreneur:boolean. So users have two types; one is normal users, the other is professional users. For normal users, only emails and usernames are required and other fields are optional. For professional users, in addition to above,

Re: [Rails] required field for one, optional for another

2013-04-27 Thread Colin Law
On 27 April 2013 11:40, Soichi Ishida li...@ruby-forum.com wrote: rails 3.2.11 My app has User model, its one of the fields is entrepreneur:boolean. So users have two types; one is normal users, the other is professional users. For normal users, only emails and usernames are required and

[Rails] where exactly are gems?

2013-04-27 Thread John Merlino
when you add a gem to the Gemfile and then run bundle install, where does the command look for the gem? If you had gem 'rails', :git = 'github.com/rails/rails.git, I assume it would update your system .rvm gems directory with the latest github commits. But what is the default repository that

[Rails] Re: where exactly are gems?

2013-04-27 Thread Damjan Rems
.bundle I usualy change it to vendor: bundle install --path vendor by TheR -- 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 unsubscribe from this group and stop receiving emails from it,

Re: [Rails] where exactly are gems?

2013-04-27 Thread Walter Lee Davis
On Apr 27, 2013, at 12:19 PM, John Merlino wrote: when you add a gem to the Gemfile and then run bundle install, where does the command look for the gem? If you had gem 'rails', :git = 'github.com/rails/rails.git, I assume it would update your system .rvm gems directory with the latest

Re: [Rails] where exactly are gems?

2013-04-27 Thread Leoncio Caminha
Rubygems .org is a default gem source with u dont specify i guess Sent from my iPad On 27/04/2013, at 13:19, John Merlino stoici...@aol.com wrote: when you add a gem to the Gemfile and then run bundle install, where does the command look for the gem? If you had gem 'rails', :git =

[Rails] bundle.lock and production deploy

2013-04-27 Thread John Merlino
From my understanding, Gemfile.lock lists all the gems installed for the application along with the specific versions used. This means your app will only use the versions mentioned here and no others, even if updates for those gems are available. When you are deploying your application to staging

[Rails] mysql on different server than rails application

2013-04-27 Thread John Merlino
There's a common problem when you run bundle install and it tries to install the msql2 gem but fails when mysql itself is not installed on the machine. What if you have mysql installed on a different machine (because you don't want your web application which is accessible to the public and your

Re: [Rails] mysql on different server than rails application

2013-04-27 Thread Walter Lee Davis
On Apr 27, 2013, at 2:31 PM, John Merlino wrote: There's a common problem when you run bundle install and it tries to install the msql2 gem but fails when mysql itself is not installed on the machine. What if you have mysql installed on a different machine (because you don't want your web

Re: [Rails] required field for one, optional for another

2013-04-27 Thread Dave Aronson
On Sat, Apr 27, 2013 at 6:40 AM, Soichi Ishida li...@ruby-forum.com wrote: Is there any Ruby way to set the requirement depending on the type of users? If I recall correctly, some of the standard validation helpers will take an if parameter, such that if the parameter evaluates to false, the