Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 732459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:08:40+00:00 2026-05-14T07:08:40+00:00

If you build a projection like this: t = Arel::Table.new(:projects) ps = t.project(t[:id].as(:snark)) How

  • 0

If you build a projection like this:

t = Arel::Table.new(:projects)
ps = t.project(t[:id].as(:snark))

How do you get the result column that’s named :snark?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:08:40+00:00Added an answer on May 14, 2026 at 7:08 am

    Since you are using the Arel Core and not active record (which will be preferred in the future) You must understand what is going on behind the engine. Depending on if you call .each or .first you will be returned an array of Arel::Row(s) or a single Arel::Row (respectively)

    The Arel::Row consists of at least three parts. The relation, the header, and the body (tuple). These are the principles of relational algebra.

    t = Arel::Table.new(:projects)
    ps = t.project(t[:id].as(:snark)).first 
    #should do the trick and return an Arel::Row
    

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating a new project with unit tests, Xcode sets the build configuration to
So, I have this new project. My company uses the SalesForce.com cloud to store
We are currently using JDeveloper to build our production EARs. One problem with this
I'm trying to build Sencha Touch 2 application for production, but get an error.
After build, I need to modify an HTML file that points the client to
We have a very large GWT project that results in a monolithic app about
I am using XNA to build a project where I can draw graffiti on
I have an application that does projection of data for my client over a
I'm currently working on a build system in Phing that takes a Zend Framework
I'm a little shocked that (if?) this precise questions hasn't been asked, but 15

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.