Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes FormData.find_all_group_by_url #6

Open
wants to merge 3 commits into from

1 participant

@divineforest

Postgres failed on this SQL:
SELECT * FROM "form_datas" GROUP BY id;
while it can not use * with GROUP BY. Fixed changing

find(:all, :group => 'url')
to
find(:all, :group => 'url', :select => 'url')

divineforest added some commits
@divineforest divineforest Fixed "wrong number of arguments (3 for 2) (ArgumentError)" erorr on …
…application initialization
39fd8b4
@divineforest divineforest Fixes in FormData.find_all_group_by_url:
PGError: ERROR:  column "form_datas.id" must appear in the GROUP BY clause or be used in an aggregate function
: SELECT * FROM "form_datas"  GROUP BY url
PostgreSQL error
93e0a65
@divineforest divineforest 1. Show time in long format
2. Use I18n
4ca1479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 6, 2010
  1. @divineforest
  2. @divineforest

    Fixes in FormData.find_all_group_by_url:

    divineforest authored
    PGError: ERROR:  column "form_datas.id" must appear in the GROUP BY clause or be used in an aggregate function
    : SELECT * FROM "form_datas"  GROUP BY url
    PostgreSQL error
Commits on Oct 20, 2010
  1. @divineforest

    1. Show time in long format

    divineforest authored
    2. Use I18n
This page is out of date. Refresh to see the latest.
View
2  app/helpers/admin/form_datas_helper.rb
@@ -29,7 +29,7 @@ def data_columns
end
def date_format(timestamp)
- timestamp && timestamp.to_date.to_s(:rfc822)
+ timestamp && l(timestamp, :format => :long)
end
def filters_present(&block)
View
2  app/models/form_data.rb
@@ -30,7 +30,7 @@ def self.form_paginate(params)
end
def self.find_all_group_by_url
- find(:all, :group => 'url')
+ find(:all, :group => 'url', :select => 'url')
end
def self.find_for_export(params, export_all)
View
10 database_mailer_extension.rb
@@ -12,18 +12,20 @@ class DatabaseMailerExtension < Radiant::Extension
end
end
end
-
+
def activate
throw "MailerExtension must be loaded before DatabaseMailerExtension" unless defined?(MailerExtension)
MailController.class_eval do
include DatabaseMailerProcessing
alias_method_chain :process_mail, :database
end
- admin.nav["content"] << admin.nav_item(:database_mailer, "Database Mailer", "/admin/form_datas")
-
+ tab "Content" do
+ add_item "Database Mailer", "/admin/form_datas"
+ end
+
Mime::Type.register "application/vnd.ms-excel", :xls
end
-
+
def deactivate
end
end
Something went wrong with that request. Please try again.