Anomalie #936
Enumeration#get_values n' existe pas
| Status: | Résolu | Start date: | 10/10/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% | ||
| Category: | general | Estimated time: | 2.00 hours | |
| Target version: | 1.2 | Spent time: | 2.00 hours |
Description
Comme Enumération dérive de ActiveRecord::Base, la syntaxe dans jredmine_controller.rb de la requête pour retrouver toutes les énumérations d'un certain type est :
# recuperation des valeurs d'une enumration
def get_enumeration(type = params[:type])
@result = Enumeration.find(:all, :conditions =>["type = :sqlParamType", {:sqlParamType => type}])
render_array_result @result, "enumerations"
end
History
#1
Updated by Tony Chemit almost 2 years ago
- Status changed from Nouveau to Rejeté
- % Done changed from 0 to 100
- Estimated time set to 1.00
I tried this code, but it does not work for me.
That is the problem in fact ? I don't see the point since the code is actually working and moreover this is not a public api.
ActiveRecord::StatementInvalid (PGError: ERROR: column "type" does not exist
LINE 1: SELECT * FROM "enumerations" WHERE (type = E'IPRI')
^
: SELECT * FROM "enumerations" WHERE (type = E'IPRI') ):
#2
Updated by Tony Chemit almost 2 years ago
- Status changed from Rejeté to Résolu
- Estimated time changed from 1.00 to 2.00
In fact, this happens only with redmibne >1.1, since version 1.2 of jredmine will only works with this version, we will apply the patch.
thanks :)