diff --git a/app/controllers/index.rb b/app/controllers/index.rb new file mode 100644 index 0000000..89cb2a3 --- /dev/null +++ b/app/controllers/index.rb @@ -0,0 +1,3 @@ +get '/' do + redirect '/index' +end \ No newline at end of file diff --git a/app/models/survey.rb b/app/models/survey.rb index 52699b9..0337651 100644 --- a/app/models/survey.rb +++ b/app/models/survey.rb @@ -2,7 +2,7 @@ class Survey < ActiveRecord::Base belongs_to :author, class_name: "User" has_many :questions has_many :responses - has_many :respondants, through: :responses, source: :user + has_many :respondants, through: :responses, source: :key => "value", user validates :author_id, :title, presence: true end