This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO user_blacklisted_tags (user_id, tag_id, created_at, updated_at) VALUES ( | |
( | |
SELECT id FROM users | |
WHERE disease_id | |
IN (12) AND | |
users.id NOT IN (47479,53763,16596,25972,13185,48185,71438,38883,48974,33480,65640,73067,60292,76512,30192,20260,39597,33017,65233,9992,35659,10845,76534,10434,70718,49242,3659,18607,7734,37208,14073,30810,62107,20031,9117,46134,24706,11833,41968,23498,16637,40927,35025,17,17256,21279,28152,39995,16891,49446,11270,36465,46435,24231,50815,50903,31054,43088,52059,36481,54280,59,53647,38864,53348,19060,18298,50691,48272,3775,37787,46221,12632,14213,34881,35067,54880,40967,53177,57007,12722,64738,64337,72241,16085,60917,26094,74276,61587,50244,7453,7629,51448,65743,66534,18954,53534,67382,78343,30032,81890,81879,70943,72638,49028,71921,42936,36925)), | |
494, | |
'2010-04-15 15:18:07', | |
'2010-04-15 15:18:07' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Post < ActiveRecord::Base | |
validates_presence_of :poster_id, :class_name => "User" | |
state_machine :type do | |
state :topic do | |
validates_presence_of :subject, :forum_id | |
has_many :posts, :foreign_key => 'topic_id' | |
end | |
state :post do | |
validates_presence_of :topic_id |
NewerOlder