refinery / refinerycms-calendar

Refinery CMS Events Engine
http://refinerycms.com
69 stars 73 forks source link

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

Open cheeby opened 12 years ago

cheeby commented 12 years ago

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:

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 commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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.