On 22 Feb 2011, at 06:57, Bhasker Harihara <harihara.bhas...@gmail.com> wrote:

> 
> Hi,
> 
> Is it not accessing the model at the time of
> 
> $rake db:migrate.
> 
It won't be instantiating any model objects at that point. Besides, it's 
completely legal to create a model with a column called type, it's just that 
activerecord makes assumptions about what is going to be in that column

Fred


> Is there anything like a cheat sheet for rails ?  
> 
> Actually I found one but that did not have "type" as a reserved word.
> 
> Regards,
> 
> On Tue, Feb 22, 2011 at 12:19 PM, Michael Pavling <pavl...@gmail.com> wrote:
> On 22 February 2011 06:15, Bhasker Harihara <harihara.bhas...@gmail.com> 
> wrote:
> > Hi,
> >
> > I used "type" as a column in "rails generate model" there was no error.
> >
> > ActiveRecord::SubclassNotFound in UsersController#show
> 
> "Type" is a reserved word in Rails (the wiki seems to be not
> responding, but there's still a few references around):
> 
> http://juicebar.wordpress.com/2007/05/30/reserved-words-in-rails/
> 
> > I did a show function in users contoller then rails threw up the error.  But
> > should it not give this error right at the time of generate
> > model or db:migrate or atleast create.
> 
> At neither of those times is ActiveRecord doing anything with the
> model (unless you're accessing your model in your migration...) so it
> wouldn't cause an error until you try to instanciate an object.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to