parent
							
								
									da85c3efb8
								
							
						
					
					
						commit
						c9de30bd83
					
				@ -0,0 +1,3 @@
 | 
				
			||||
class PollAnswers < ActiveRecord::Base
 | 
				
			||||
  attr_accessible :answer_position, :answer_text, :poll_questions_id
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,3 @@
 | 
				
			||||
class PollQuestions < ActiveRecord::Base
 | 
				
			||||
  attr_accessible :is_necessary, :polls_id, :question_title, :question_type
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,3 @@
 | 
				
			||||
class PollUser < ActiveRecord::Base
 | 
				
			||||
  attr_accessible :poll_id, :user_id
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,3 @@
 | 
				
			||||
class PollVotes < ActiveRecord::Base
 | 
				
			||||
  attr_accessible :poll_answers_id, :poll_questions_id, :user_id, :vote_text
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,3 @@
 | 
				
			||||
class Polls < ActiveRecord::Base
 | 
				
			||||
  attr_accessible :closed_at, :polls_group_id, :polls_name, :polls_status, :polls_type, :published_at, :user_id
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,15 @@
 | 
				
			||||
class CreatePolls < ActiveRecord::Migration
 | 
				
			||||
  def change
 | 
				
			||||
    create_table :polls do |t|
 | 
				
			||||
      t.string :polls_name
 | 
				
			||||
      t.string :polls_type
 | 
				
			||||
      t.integer :polls_group_id
 | 
				
			||||
      t.integer :polls_status
 | 
				
			||||
      t.integer :user_id
 | 
				
			||||
      t.datetime :published_at
 | 
				
			||||
      t.datetime :closed_at
 | 
				
			||||
 | 
				
			||||
      t.timestamps
 | 
				
			||||
    end
 | 
				
			||||
  end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,12 @@
 | 
				
			||||
class CreatePollQuestions < ActiveRecord::Migration
 | 
				
			||||
  def change
 | 
				
			||||
    create_table :poll_questions do |t|
 | 
				
			||||
      t.string :question_title
 | 
				
			||||
      t.integer :question_type
 | 
				
			||||
      t.integer :is_necessary
 | 
				
			||||
      t.integer :polls_id
 | 
				
			||||
 | 
				
			||||
      t.timestamps
 | 
				
			||||
    end
 | 
				
			||||
  end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,11 @@
 | 
				
			||||
class CreatePollAnswers < ActiveRecord::Migration
 | 
				
			||||
  def change
 | 
				
			||||
    create_table :poll_answers do |t|
 | 
				
			||||
      t.integer :poll_questions_id
 | 
				
			||||
      t.text :answer_text
 | 
				
			||||
      t.integer :answer_position
 | 
				
			||||
 | 
				
			||||
      t.timestamps
 | 
				
			||||
    end
 | 
				
			||||
  end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,12 @@
 | 
				
			||||
class CreatePollVotes < ActiveRecord::Migration
 | 
				
			||||
  def change
 | 
				
			||||
    create_table :poll_votes do |t|
 | 
				
			||||
      t.integer :user_id
 | 
				
			||||
      t.integer :poll_questions_id
 | 
				
			||||
      t.integer :poll_answers_id
 | 
				
			||||
      t.text :vote_text
 | 
				
			||||
 | 
				
			||||
      t.timestamps
 | 
				
			||||
    end
 | 
				
			||||
  end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,10 @@
 | 
				
			||||
class CreatePollUsers < ActiveRecord::Migration
 | 
				
			||||
  def change
 | 
				
			||||
    create_table :poll_users do |t|
 | 
				
			||||
      t.integer :user_id
 | 
				
			||||
      t.integer :poll_id
 | 
				
			||||
 | 
				
			||||
      t.timestamps
 | 
				
			||||
    end
 | 
				
			||||
  end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
require 'test_helper'
 | 
				
			||||
 | 
				
			||||
class PollAnswersTest < ActiveSupport::TestCase
 | 
				
			||||
  # test "the truth" do
 | 
				
			||||
  #   assert true
 | 
				
			||||
  # end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
require 'test_helper'
 | 
				
			||||
 | 
				
			||||
class PollQuestionsTest < ActiveSupport::TestCase
 | 
				
			||||
  # test "the truth" do
 | 
				
			||||
  #   assert true
 | 
				
			||||
  # end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
require 'test_helper'
 | 
				
			||||
 | 
				
			||||
class PollUserTest < ActiveSupport::TestCase
 | 
				
			||||
  # test "the truth" do
 | 
				
			||||
  #   assert true
 | 
				
			||||
  # end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
require 'test_helper'
 | 
				
			||||
 | 
				
			||||
class PollVotesTest < ActiveSupport::TestCase
 | 
				
			||||
  # test "the truth" do
 | 
				
			||||
  #   assert true
 | 
				
			||||
  # end
 | 
				
			||||
end
 | 
				
			||||
@ -0,0 +1,7 @@
 | 
				
			||||
require 'test_helper'
 | 
				
			||||
 | 
				
			||||
class PollsTest < ActiveSupport::TestCase
 | 
				
			||||
  # test "the truth" do
 | 
				
			||||
  #   assert true
 | 
				
			||||
  # end
 | 
				
			||||
end
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue