diff --git a/lib/ext/person.rb b/lib/ext/person.rb index 7e91681..1ec2681 100644 --- a/lib/ext/person.rb +++ b/lib/ext/person.rb @@ -8,6 +8,8 @@ class Person attr_accessible :percentage_incomplete + delegate :login, :to => :user, :prefix => true + scope :search, lambda { |name="", state="", city="", email=""| like_sql = "" values = [] @@ -33,8 +35,8 @@ class Person end like_sql = like_sql[0..like_sql.length-5] - { - :joins => :user, + { + :joins => :user, :conditions=>[like_sql, *values] } } diff --git a/test/functional/mpog_software_plugin_myprofile_controller_test.rb b/test/functional/mpog_software_plugin_myprofile_controller_test.rb index 80873bb..a5aae0f 100644 --- a/test/functional/mpog_software_plugin_myprofile_controller_test.rb +++ b/test/functional/mpog_software_plugin_myprofile_controller_test.rb @@ -22,7 +22,7 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase DatabaseDescription.create(:name => "database") OperatingSystemName.create(:name=>"Debian") - login_as(@person.user.login) + login_as(@person.user_login) @environment = Environment.default @environment.enable_plugin('MpogSoftwarePlugin') @environment.save! @@ -64,7 +64,7 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase assert response.count == 0 end - should 'create a new software with all fields filled in' do + should 'create a new software with all fields filled in' do fields = software_fields @environment.add_admin(@person) post :new_software, :profile => @person.identifier, :community => fields[1], :license_info => fields[0], -- libgit2 0.21.2