Sean Hussey
2005-Oct-17 17:22 UTC
"cannot convert Symbol into String" after renaming model
Hi everyone,
I chose to rename my existing ''user'' model to
''person'' when adding the
ModelSecurity code to my app. I went through and changed all of the
following references:
user => person
User => Person
users => people
Users => People
I think I''ve got everything translated. But now I get "cannot
convert
Symbol into String" when I run the following code:
<%= text_field_with_auto_complete :person, :username, { :size => 30 },
:skip_style => true -%><br />
The only thing different is ":person" was ":user".
I renamed _user.rhtml to _person.rhtml. The db table is now "people"
instead of "users". I''m just not sure why I''m
getting that error.
Any thoughts?
Thanks!
Sean
Sean Hussey
2005-Oct-18 15:13 UTC
Re: "cannot convert Symbol into String" after renaming model
No ideas? Ouch. Perhaps I''ll try the Ruby list. I''ve found a few other references to user which should have been person, but nothing seems to affect this issue. On 10/17/05, Sean Hussey <seanhussey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone, > > I chose to rename my existing ''user'' model to ''person'' when adding the > ModelSecurity code to my app. I went through and changed all of the > following references: > > user => person > User => Person > users => people > Users => People > > I think I''ve got everything translated. But now I get "cannot convert > Symbol into String" when I run the following code: > > <%= text_field_with_auto_complete :person, :username, { :size => 30 }, > :skip_style => true -%><br /> > > The only thing different is ":person" was ":user". > > I renamed _user.rhtml to _person.rhtml. The db table is now "people" > instead of "users". I''m just not sure why I''m getting that error. > > Any thoughts? > > Thanks! > > Sean >
Tom Davies
2005-Oct-18 15:42 UTC
Re: Re: "cannot convert Symbol into String" after renaming model
Have you tried changing your :person and :username to strings?
As in:
<%= text_field_with_auto_complete ''person'',
''username'', { :size => 30 },
:skip_style => true -%>
Tom
On 10/18/05, Sean Hussey
<seanhussey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> No ideas? Ouch. Perhaps I''ll try the Ruby list.
>
> I''ve found a few other references to user which should have been
> person, but nothing seems to affect this issue.
>
> On 10/17/05, Sean Hussey
<seanhussey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Hi everyone,
> >
> > I chose to rename my existing ''user'' model to
''person'' when adding the
> > ModelSecurity code to my app. I went through and changed all of the
> > following references:
> >
> > user => person
> > User => Person
> > users => people
> > Users => People
> >
> > I think I''ve got everything translated. But now I get
"cannot convert
> > Symbol into String" when I run the following code:
> >
> > <%= text_field_with_auto_complete :person, :username, { :size =>
30 },
> > :skip_style => true -%><br />
> >
> > The only thing different is ":person" was ":user".
> >
> > I renamed _user.rhtml to _person.rhtml. The db table is now
"people"
> > instead of "users". I''m just not sure why
I''m getting that error.
> >
> > Any thoughts?
> >
> > Thanks!
> >
> > Sean
> >
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Sean Hussey
2005-Oct-19 22:00 UTC
Re: Re: "cannot convert Symbol into String" after renaming model
Tried that. No go:
undefined method `readable?'' for nil:NilClass
Maybe there''s something different about the Locomotive bundles that I
did or didn''t have in my pervious local installation.
I think I''ve narrowed it down to my environment, but I can''t
run
script/server to see. I get this:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/clean_logger.rb:13:in
`remove_const'': constant Logger::Format not defined (NameError)
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/clean_logger.rb:13
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support.rb:31
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from ./script/../config/environment.rb:50
from ./script/server:42
I''ll have to try to find another way to get this working, though.
Thanks for the help!
Sean
On 10/18/05, Tom Davies
<atomgiant-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Have you tried changing your :person and :username to strings?
>
> As in:
>
> <%= text_field_with_auto_complete ''person'',
''username'', { :size => 30 },
> :skip_style => true -%>
>
> Tom