Merge Request #207

Merged
softwarepublico/softwarepublico!207
Created by Gabriel Silva

Fixes license_info autocomplete on Software creation

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

Closes #767

Assignee: Daniela Feitosa
Milestone: None

Merged by Daniela Feitosa

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