• R/O
  • SSH
  • HTTPS

minisns: 提交


Commit MetaInfo

修订版16 (tree)
时间2009-02-17 01:30:57
作者rainyrook

Log Message

フォローユーザーリスト表示の改善

更改概述

差异

--- minisns/app/helpers/application_helper.rb (revision 15)
+++ minisns/app/helpers/application_helper.rb (revision 16)
@@ -13,4 +13,18 @@
1313 ''
1414 end
1515 end
16+
17+ def get_profile_picture(associated_account)
18+ a_users_picture_profile = Picture.find(:first, :conditions => ["user_id = ? and profile_picture_flag = true", associated_account.id])
19+ alt_string="#{associated_account.user_info.last_name} #{associated_account.user_info.first_name}"
20+
21+ unless a_users_picture_profile.nil?
22+ p a_users_picture_profile.image_name
23+ image_string = image_tag url_for_image_column(a_users_picture_profile, "image_name", :thumb)
24+# image_string = "<img src='/images/noimage_member76.gif' WIDTH='50' HEIGHT='50' alt='#{alt_string}'>"
25+ else
26+ image_string = "<img src='/images/noimage_member76.gif' WIDTH='50' HEIGHT='50' alt='#{alt_string}'>"
27+ end
28+ image_string
29+ end
1630 end
--- minisns/app/models/user_info.rb (revision 15)
+++ minisns/app/models/user_info.rb (revision 16)
@@ -8,14 +8,4 @@
88 validates_length_of :address1, :within => 1..254
99 validates_length_of :telephone, :within => 1..40
1010
11- def get_profile_picture
12- a_users_picture_profile = Picture.find(:first, :conditions => ["user_id = ? and profile_picture_flag = true", id])
13- alt_string="#{self.user_info.last_name} #{self.first_name}"
14- unless a_users_picture_profile.nil?
15- image_string = image_tag url_for_image_column(a_users_picture_profile, "image_name", :thumb)
16- else
17- image_string = "<img src='/images/noimage_member76.gif' WIDTH='50' HEIGHT='50' alt='#{alt_string}'>"
18- end
19- image_string
20- end
2111 end
--- minisns/app/controllers/mypage_controller.rb (revision 15)
+++ minisns/app/controllers/mypage_controller.rb (revision 16)
@@ -7,7 +7,6 @@
77
88 def view
99 account_associations = AccountAssociation.find(:all, :conditions => ["user_id = ? ",self.current_user.id])
10- p self.current_user.child_accounts.size
1110 sql_str = "";
1211 account_associations.each do |account_association|
1312 sql_str = sql_str + " , " unless sql_str == ""
Show on old repository browser