Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May I suggest a change to respect column name's case? #281

Open
ablancag opened this issue Feb 26, 2016 · 13 comments
Open

May I suggest a change to respect column name's case? #281

ablancag opened this issue Feb 26, 2016 · 13 comments

Comments

@ablancag
Copy link
Contributor

In file https://github.com/leikind/wice_grid/blob/rails3/lib/wice/columns/column_custom_dropdown.rb

lines 107 and 109, where you generate the table.column_name = something....

I found it useful to chance those lines to:

" #{@column_wrapper.alias_or_table_name(table_alias)}.\"#{@column_wrapper.name}\" is " + opts

and

[" #{@column_wrapper.alias_or_table_name(table_alias)}.\"#{@column_wrapper.name}\" = ?", opts]

Please notice the "'s surrounding #{@column_wrapper.name}.

I had an issue while using PostgresSQL with a DB where column names had upper cases: with the "'s the name is respected. Without them, it wasn't and PostgreSQL wasn't finding the column, generating an exception and well, crashing the page.

Let me know what you think.

Cheers,

Alex B.

@leikind
Copy link
Owner

leikind commented Feb 26, 2016

could you make a pull request?

@ablancag
Copy link
Contributor Author

Sure. Let me have some time for this and sure.

@ablancag
Copy link
Contributor Author

ablancag commented Mar 8, 2016

Sorry for the delay. Went out on a business trip.

We'll try to do this week. :)

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

Hi. I'm ready to finally submit my change into a branch for your review.
Can you give me permissions to push my branch?

Regards

@leikind
Copy link
Owner

leikind commented Apr 6, 2016

why not simply a pull request?

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

This would be my first pull request. I read github's documentation and thought it involved me pushing first a branch and from there creating the pull request.

Did you mean a pull request from my own clone? Sort of manual pull request?

@leikind
Copy link
Owner

leikind commented Apr 6, 2016

yes, a pull request from your fork.
Github makes it very easy to do

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

I don't have a fork in Github. I'm working locally only. But let me try doing a fork :) Hold on.

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

That was super easy! Let me push to my fork then. Hold on.

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

Sent. Can you see it?

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

Tried to create the pull request matching the base fork and origin tag. But couldn't, so I sent it out based on rails3.

@leikind
Copy link
Owner

leikind commented Apr 6, 2016

I see it, but I will review it later

On Wed, Apr 6, 2016 at 6:41 PM, Alex B. [email protected] wrote:

Tried to create the pull request matching the base fork and origin tag.
But couldn't, so I sent it out based on rails3.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#281 (comment)

Best regards,
Yuri Leikind

Sent from my Nokia 3310

@ablancag
Copy link
Contributor Author

ablancag commented Apr 6, 2016

That's fine. As long as you can see it. Thanks! Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants