Displaying 1 result from an estimated 1 matches for "profile_typ".
Did you mean:
profile_type
2007 Oct 15
5
Very simple code throwing "uninitialized constant" error
...blem is.
profile_controller.rb
class ProfileController < ApplicationController
def show
@profile = Profile.find_by_school_id(params[:id])
end
end
-----------------------------------------------------------
profile.rb
class Profile < ActiveRecord::Base
belongs_to :school
belongs_to :profile_type
translates :text #<--- I''m using the Globalize plugin
end
--------------------------------------------------------
http://localhost:3000/en/profile/show/51 throws:
NameError in ProfileController#show
uninitialized constant Profile
RAILS_ROOT: script/../config/..
vendor/rails/...