search for: current_teacher

Displaying 2 results from an estimated 2 matches for "current_teacher".

2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
...ename="rails_local_env_setup.txt", @tempfile= #<File:/var/folders/t4/lfmj7mhj52b2krryzh7dj4hh0000gn/T/RackMultipart20130604-29589-2c0seo>>}, "action"=>"create", "controller"=>"resources" } **Controller** def create if current_teacher @resource = ResourceObject.create_teacher_resource(params, current_teacher) end if current_student @resource = ResourceObject.create_student_resource(params, current_student) end if current_admin @resource = Resource.new(params[:resource]) end respond_to do |format| i...
2010 Apr 20
5
Spring Cleaning
Right now in my view, I have a whole HUGE clump of <% if current_user %> and then <% if current_admin %> and then <% if current_teacher %> and then all that other stuff in my view. I have a ginourmous chunk of if and else statements in my views... is there a way to make it prettier? The if and else''s almost all have the same functions, expect for some minor changes. Like this- <% if current_user %> <%= link_...