Permalink
Browse files

Link models using ForumLinkWatsupLink

  • Loading branch information...
1 parent c287e11 commit f491143216c20e1eee58b438cf76ecf83a85656b @denispeplin committed Apr 25, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −1 app/models/forum_link_watsup_link.rb
  2. +4 −1 script/getorg.rb
@@ -1,5 +1,5 @@
class ForumLinkWatsupLink < ActiveRecord::Base
belongs_to :forum_link
belongs_to :watsup_link
- attr_accessible :probability
+ attr_accessible :probability, :forum_link_id, :watsup_link_id
end
View
@@ -72,7 +72,10 @@
ws_max = ws
end
end
- puts fl.text + ' ' + ws_max.to_s + ' ' + wl_selected.text if ws_max >= 0.5
+ if ws_max >= 0.5
+ puts fl.text + ' ' + ws_max.to_s + ' ' + wl_selected.text
+ ForumLinkWatsupLink.create(forum_link_id: fl.id, watsup_link_id: wl_selected.id, probability: ws_max)
+ end
end
#examples:

0 comments on commit f491143

Please sign in to comment.