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 DrugAssessmentsController < ApplicationController | |
before_filter :authenticate_user! | |
def create | |
@form = DrugAssessment.create(drug_assessment_params) | |
redirect_to drug_assessments_path | |
end | |
def new |
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 DrugAssessmentsController < ApplicationController | |
before_filter :authenticate_user! | |
def create | |
@form = DrugAssessment.create(drug_assessment_params) | |
redirect_to drug_assessments_path | |
end | |
def new |
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
Started PATCH "/students/3" for 127.0.0.1 at 2013-10-03 13:10:37 -0700 | |
Processing by StudentsController#update as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"F/EvSPLZeYtB7lNNsCs8eA/bB3LMjcP+OvKfzBFoFLo=", "student"=>{"case_no"=>"7777", "program"=>"Web Development", "admission_status"=>"", "temporary_password"=>"[FILTERED]", "admission_date(1i)"=>"2013", "admission_date(2i)"=>"10", "admission_date(3i)"=>"3", "admission_date(4i)"=>"15", "admission_date(5i)"=>"27", "user"=>{"name"=>"Travis Glover", "first_name"=>"Trav", "middle_name"=>"L", "last_name"=>"Glover", "email"=>"glovertravis@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "social_security_no"=>"654544303", "sex"=>"M", "date_of_birth(1i)"=>"2013", "date_of_birth(2i)"=>"3", "date_of_birth(3i)"=>"13", "street_address"=>"473 W Shaw Ave", "city"=>"Fresno", "state"=>"CA", "postal_code"=>"93704", "home_phone"=>"3333333333", "work_phone"=>"5556667777", "mobile_phone"=>"5557778888", "message_id"=>""}}, "commit"=>"Update |
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
ActiveRecord::EagerLoadPolymorphicError at /students | |
Can not eagerly load the polymorphic association :loginable | |
<% @table.each do |s| %> |
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 DrugAssessmentsController < ApplicationController | |
before_filter :authenticate_user! | |
def create | |
@form = DrugAssessment.create(drug_assessment_params) | |
@query_string = drug_assessment_params[:student_id] |
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
<% title "Take Survey" %> | |
<%= form_for @survey, :url => { :action => "clone"}, method: :post do |f| %> | |
<p> | |
<%= f.label :name %><br /> | |
<%= f.text_field :name %> | |
<%= f.hidden_field :student_id %> | |
</p> | |
<%= f.fields_for :questions do |builder| %> |
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
<h3>Result Sets</h3> | |
<div class="span12" style="width:100%;margin:5px;"> | |
<%= simple_form_for @result_set, url: {action: 'create'} do |f| %> | |
<% @surveys.each do |a| %> | |
<ul> | |
<%= a.name %> | |
<%= a.id %> | |
<br><br> |
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
<h3>Result Sets</h3> | |
<div class="span12" style="width:100%;margin:5px;"> | |
<% if current.loginable_type != 'Student' %> | |
<%= simple_form_for(result_sets_path, :method =>'get', :html => { :class => 'form-horizontal' }) do %> | |
<%= select_tag 'id', options_for_select(@quiz_id), { :prompt => 'Quiz Name'} %> | |
<%= select_tag 'student_id', options_for_select(@quiz_student_name), { :prompt => 'Student Name'} %> | |
<%= submit_tag 'Submit', :class => 'btn btn-primary' %> | |
<% end %> | |
<% end %> |
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 ResultSet < ActiveRecord::Base | |
belongs_to :survey | |
belongs_to :student | |
accepts_nested_attributes_for :survey | |
attr_accessor :score, :correct_count, :total_count, :percent | |
serialize :serial | |
end |
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
<h3>Result Sets</h3> | |
<div class="span12" style="width:100%;margin:5px;"> | |
<% if current.loginable_type != 'Student' %> | |
<%= simple_form_for(result_sets_path, :method =>'get', :html => { :class => 'form-horizontal' }) do %> | |
<%= select_tag 'id', options_for_select(@quiz_id), { :prompt => 'Quiz Name'} %> | |
<%= select_tag 'student_id', options_for_select(@quiz_student_name), { :prompt => 'Student Name'} %> | |
<%= submit_tag 'Submit', :class => 'btn btn-primary' %> | |
<% end %> | |
<% else %> |
OlderNewer