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

ActiveRecord::StatementInvalid in Refinery/calendar/admin/events#index #29

Open
cheeby opened this issue Sep 14, 2012 · 3 comments
Open

Comments

@cheeby
Copy link

cheeby commented Sep 14, 2012

Hi,

I got this error when creating my first event:

ActionView::Template::Error (PG::Error: ERROR: non-integer constant in ORDER BY
LINE 1: ...ents".* FROM "refinery_calendar_events" ORDER BY 'from' DES...
^
: SELECT "refinery_calendar_events".* FROM "refinery_calendar_events" ORDER BY 'from' DESC LIMIT 20 OFFSET 0):
1:


    2: <%= render :partial => 'event', :collection => @events %>
    3:

4: <%= render '/refinery/admin/sortable_list',
5: :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true %>
activerecord (3.2.8) lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in async_exec' activerecord (3.2.8) lib/active_record/connection_adapters/postgresql_adapter.rb:1158:inexec_no_cache'
activerecord (3.2.8) lib/active_record/connection_adapters/postgresql_adapter.rb:664:in block in exec_query' activerecord (3.2.8) lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log'
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in instrument' activerecord (3.2.8) lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog'

@brenes
Copy link

brenes commented Sep 17, 2012

There are some issues in PostgreSQL due to the name of the 'from' attribute (which is a reserved word in Postgre).

There are two pull requests related wit this problem (#25 and #28) but none of them have been merged.

@cheeby
Copy link
Author

cheeby commented Sep 17, 2012

Thanks. Would putting backticks around from help? e.g., "... ORDER BY from ... " Where is that controller located? Thanks.

Steve

On Sep 17, 2012, at 1:18 PM, brenes notifications@github.com wrote:

There are some issues in PostgreSQL due to the name of the 'from' attribute (which is a reserved word in Postgre).

There are two pull requests related wit this problem (#25 and #28) but none of them have been merged.


Reply to this email directly or view it on GitHub.

@cheeby
Copy link
Author

cheeby commented Sep 17, 2012

I guess not. I tried this in rails db console and it doesn't like it.

Thanks.

Steve

On Sep 17, 2012, at 1:53 PM, Steve Fox steve@wiscota.com wrote:

Thanks. Would putting backticks around from help? e.g., "... ORDER BY from ... " Where is that controller located? Thanks.

Steve

On Sep 17, 2012, at 1:18 PM, brenes notifications@github.com wrote:

There are some issues in PostgreSQL due to the name of the 'from' attribute (which is a reserved word in Postgre).

There are two pull requests related wit this problem (#25 and #28) but none of them have been merged.


Reply to this email directly or view it on GitHub.

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