diff --git a/Pearlception/app/controllers/grades_controller.rb b/Pearlception/app/controllers/grades_controller.rb index 2d197f1..b62cf36 100644 --- a/Pearlception/app/controllers/grades_controller.rb +++ b/Pearlception/app/controllers/grades_controller.rb @@ -1,6 +1,10 @@ class GradesController < ApplicationController before_filter :deny_to_visitors + def new + + end + def index @grades = Grade.all end diff --git a/Pearlception/app/controllers/registrations_controller.rb b/Pearlception/app/controllers/registrations_controller.rb index 3b8ced9..6a70f42 100644 --- a/Pearlception/app/controllers/registrations_controller.rb +++ b/Pearlception/app/controllers/registrations_controller.rb @@ -25,16 +25,16 @@ class RegistrationsController < Devise::RegistrationsController end else flash[:alert] = "The serial key provided was invalid." - redirect_to '/' + redirect_to '/signin' end else flash[:alert] = "A company serial key must be provided to register." - redirect_to '/' + redirect_to '/signin' end if @user == "" flash[:alert] = "Please provide a password to register with." - redirect_to '/' + redirect_to '/signin' else @user.save begin @@ -46,7 +46,7 @@ class RegistrationsController < Devise::RegistrationsController if !@user.admin Apartment::Tenant.switch(Company.find(@user.company_id).company_name.gsub(/'/,'').gsub(/\s/,'')) end - redirect_to "/" and return + redirect_to "/pearlception" and return end end diff --git a/Pearlception/app/views/grades/new.html.erb b/Pearlception/app/views/grades/new.html.erb new file mode 100644 index 0000000..f9cea75 --- /dev/null +++ b/Pearlception/app/views/grades/new.html.erb @@ -0,0 +1,122 @@ +<%= stylesheet_link_tag "dashboard" %>_ + + + + +
+
+ +
+
+ + +
+
+ <%=csrf_meta_tag%> +
+ + +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+ + <%= javascript_include_tag "bootstrap.min" %>_ +