Commit 8dc50f2cb5d1ff3b96596c16c6ad97c7f5788a49

Authored by Daniela Feitosa
2 parents 1ed023bb a2e970ad

Merge branch 'fix_license_autocomplete' into 'master'

Fixes license_info autocomplete on Software creation

Correção no escopo do license_info para compatibilidade com Rails 3

Closes #767

See merge request !207
src/noosfero-spb/software_communities/lib/license_helper.rb
... ... @@ -5,7 +5,7 @@ module LicenseHelper
5 5 end
6 6  
7 7 def self.all
8   - licenses = LicenseInfo.all.without_another.select("id, version")
  8 + licenses = LicenseInfo.without_another.select("id, version")
9 9 put_another_at_the_end licenses
10 10 end
11 11  
... ...
src/noosfero-spb/software_communities/lib/license_info.rb
... ... @@ -5,5 +5,5 @@ class LicenseInfo < ActiveRecord::Base
5 5  
6 6 has_many :software_info
7 7  
8   - scope :without_another, -> { where.not(version: 'Another') }
  8 + scope :without_another, lambda { where("version != 'Another'") }
9 9 end
... ...