You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the letsrate gem in Rails 4 application. I have added the gem into my lib file and changed it a bit for making it to work with Rails 4. Now I am getting a deprecated warning like this:
DEPRECATION WARNING: The following options in your Performer.has_many :rates_without_dimension declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
has_many :spam_comments, -> { where spam: true }, class_name: 'Comment' . (called from letsrate_rateable at /home/aravind/Documents/dev/gw-c4u/lib/letsrate/lib/letsrate/model.rb:76) DEPRECATION WARNING: The following options in your Performer.has_one :rate_average_without_dimension declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
has_many :spam_comments, conditions: { spam: true }, class_name: 'Comment'
should be rewritten as the following:
has_many :spam_comments, -> { where spam: true }, class_name: 'Comment' . (called from letsrate_rateable at /home/aravind/Documents/dev/gw-c4u/lib/letsrate/lib/letsrate/model.rb:79) DEPRECATION WARNING: The following options in your Performer.has_many :performance_rates declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
has_many :spam_comments, conditions: { spam: true }, class_name: 'Comment'
should be rewritten as the following:
has_many :spam_comments, -> { where spam: true }, class_name: 'Comment' . (called from block in letsrate_rateable at /home/aravind/Documents/dev/gw-c4u/lib/letsrate/lib/letsrate/model.rb:84) DEPRECATION WARNING: The following options in your Performer.has_one :performance_average declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
has_many :spam_comments, conditions: { spam: true }, class_name: 'Comment'
should be rewritten as the following:
has_many :spam_comments, -> { where spam: true }, class_name: 'Comment' . (called from block in letsrate_rateable at /home/aravind/Documents/dev/gw-c4u/lib/letsrate/lib/letsrate/model.rb:91)
The part of the file which generates such an error is this:
I have tried bringing the :dependent=>:destroy to the last part of the line and changing conditions => {:dimension => dimension.to_s} to -> {:dimension => dimension.to_s}. It only throws errors. What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I am using the letsrate gem in Rails 4 application. I have added the gem into my lib file and changed it a bit for making it to work with Rails 4. Now I am getting a deprecated warning like this:
DEPRECATION WARNING: The following options in your Performer.has_many :rates_without_dimension declaration are deprecated: :conditions. Please use a scope block instead. For example, the following:
should be rewritten as the following:
should be rewritten as the following:
should be rewritten as the following:
should be rewritten as the following:
The part of the file which generates such an error is this:
I have tried bringing the :dependent=>:destroy to the last part of the line and changing conditions => {:dimension => dimension.to_s} to -> {:dimension => dimension.to_s}. It only throws errors. What am I doing wrong?
The text was updated successfully, but these errors were encountered: