Groups
Groups
Sign in
Groups
Groups
Ruby on Rails: Talk
Conversations
About
Send feedback
Help
Re: [Rails] column named "key"
9 views
Skip to first unread message
Rob Zolkos
unread,
Jan 8, 2019, 9:04:55 AM
1/8/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
There didn't seem to be a question here but assume you want to know
how to select a column with a reserved word.
This issue has some examples
https://github.com/rails/rails/issues/2601
Looks like using a symbol
or double quoting it should work.
On Mon, Jan 7, 2019 at 7:40 PM fugee ohu <
fuge...@gmail.com
> wrote:
>
> I'm trying to debug spree_preferences and found that the spree_preferences database table has a field named key If I select * then key appears in headers and rows are returned but if I explicity select key I get an error which I assume is because key is a reserved name and illegal to use
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
rubyonrails-ta...@googlegroups.com
.
> To post to this group, send email to
rubyonra...@googlegroups.com
.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/7d5ffe8a-c444-472b-8757-27191823d7e2%40googlegroups.com
.
> For more options, visit
https://groups.google.com/d/optout
.
Reply all
Reply to author
Forward
0 new messages