Is it a good idea to name some model attributes (and table columns) by prefixing _id to it? For example, an application will collect some transaction ID. transaction_id would be a good name for it, but it will not be associated to any other table. What kind of bad doodoo would this cause? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, As long as it''s not used in any model relationships i don''t see any trouble it could cause. On Feb 26, 2:08 am, Greg Lazarev <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Is it a good idea to name some model attributes (and table columns) by > prefixing _id to it? > For example, an application will collect some transaction ID. > transaction_id would be a good name for it, but it will not be > associated to any other table. What kind of bad doodoo would this cause? > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 25, 7:08 pm, Greg Lazarev <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Is it a good idea to name some model attributes (and table columns) by > prefixing _id to it? > For example, an application will collect some transaction ID. > transaction_id would be a good name for it, but it will not be > associated to any other table. What kind of bad doodoo would this cause? > -- > Posted viahttp://www.ruby-forum.com/.I can''t think of any problems this would cause, but it will likely confuse the heck out of the next developer on the project... --Matt Jones -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.