This patch was submitted by John Eckersberg to BZ https://bugzilla.redhat.com/show_bug.cgi?id=769635 , I am just sending it to the list
From: John Eckersberg jeckersb@redhat.com
This allows Provider to be valid when the scope is actually invoked. Without this, Provider is evaluated at ProviderAccount class load time. With db:setup, the Providers table has not been created yet so this fails. --- src/app/models/provider_account.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/models/provider_account.rb b/src/app/models/provider_account.rb index 8332135..c44be65 100644 --- a/src/app/models/provider_account.rb +++ b/src/app/models/provider_account.rb @@ -68,7 +68,7 @@ class ProviderAccount < ActiveRecord::Base before_create :no_account? before_destroy :destroyable?
- scope :enabled, where(:provider_id => Provider.enabled) + scope :enabled, lambda { where(:provider_id => Provider.enabled) }
def validate_presence_of_credentials provider.provider_type.credential_definitions.each do |cd|
On 01/05/2012 10:53 AM, Tomas Hrcka wrote:
From: John Eckersbergjeckersb@redhat.com
This allows Provider to be valid when the scope is actually invoked. Without this, Provider is evaluated at ProviderAccount class load time. With db:setup, the Providers table has not been created yet so this fails.
src/app/models/provider_account.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/models/provider_account.rb b/src/app/models/provider_account.rb index 8332135..c44be65 100644 --- a/src/app/models/provider_account.rb +++ b/src/app/models/provider_account.rb @@ -68,7 +68,7 @@ class ProviderAccount< ActiveRecord::Base before_create :no_account? before_destroy :destroyable?
- scope :enabled, where(:provider_id => Provider.enabled)
scope :enabled, lambda { where(:provider_id => Provider.enabled) }
def validate_presence_of_credentials provider.provider_type.credential_definitions.each do |cd|
ACK & Pushed
aeolus-devel@lists.fedorahosted.org