노먼, 감사합니다. 나는 슬러그 컬럼을 제거했다. 그러나 이것으로 해결하지는 못했다. 기본 슬러그가 update_attributes에서 slug_se를 덮어 쓰는 것처럼 보입니다.
이 로그에서입니다 :
Started POST "/vardag/procent/result" for 127.0.0.1 at 2011-09-22 07:36:02 +0200
Processing by CalculationsController#result as HTML
Parameters: {"utf8"=>"Ô£ô", "authenticity_token"=>"Xrq9Zf8jGl2X1G9WvqMpcN1EQw7C2lda561FN9E7ZdM=", "first_number"=>"1.0", "second_number"=>
"2.5", "operation"=>"from_a_to_b", "commit"=>"Beräkna", "calculation_type_id"=>"vardag", "id"=>"procent"}
←[1m←[36mCalculation Load (1.0ms)←[0m ←[1mSELECT `calculations`.* FROM `calculations` WHERE (`calculations`.`slug_se` = 'procent') LIMIT
1←[0m
←[1m←[35mCalculationType Load (1.0ms)←[0m SELECT `calculation_types`.* FROM `calculation_types` WHERE (`calculation_types`.`id` = 1) LIMI
T 1
←[1m←[36mCACHE (0.0ms)←[0m ←[1mSELECT `calculations`.* FROM `calculations` WHERE (`calculations`.`slug_se` = 'procent') LIMIT 1←[0m
←[1m←[35mSQL (1.0ms)←[0m BEGIN
←[1m←[36mCalculation Load (1.0ms)←[0m ←[1mSELECT `calculations`.* FROM `calculations` WHERE (`slug_se` = 'percentage' OR `slug_se` LIKE '
percentage--%') AND (id <> 1) ORDER BY LENGTH(`slug_se`) DESC, `slug_se` DESC LIMIT 1←[0m
←[1m←[35mAREL (1.0ms)←[0m UPDATE `calculations` SET `recently` = 'someone_realized,that,when,1.0,goes_to,2.5,result_percentage_a_to_b_inc
reased,150.0,%', `slug_se` = 'percentage', `updated_at` = '2011-09-22 05:36:03' WHERE (`calculations`.`id` = 1)
확인 @ 36mCACHE 아웃 곳 (제대로)를 사용 slug_se = %가 당신의 행동이 군주제를 다음 @ 36mCalculation는 선별 된 곳 slug_se = 비율 (백분율 존재의 slug_en하게 LOAD 두 행 아래로).
힘내에서 버그 리포트를 작성하겠습니다!
편집 :
내가 모델이 방법 업데이 트 전화 : 내가 도움이 될 수있는 몇 가지 더 디버깅했다
#<Calculation id: 1, name: "Percentage", preimp: nil, url: nil, clicks: 71, clicks_week: 71, is_local: true, comment: nil, nofollow: true, updated: nil, calculation_type_id: 1, created_at: "2011-03-12 07:04:54", updated_at: "2011-09-22 05:53:25", last_checked: nil, calculation_status_id: 2, region_id: 1, source: nil, affiliate: false, examples: nil, recently: "someone_realized,that,when,1.0,goes_to,2.5,result_p...", is_special: false, slug_en: "percentage", slug_se: "procent">
: 인상
def update_recently(calculation, new_recently_string)
raise calculation.inspect
calculation.update_attributes(:recently => new_recently_string.join(","))
end
이 생성
매개 변수는 다음과 같습니다.
{"utf8"=>"✓",
"_method"=>"put",
"authenticity_token"=>"Xrq9Zf8jGl2X1G9WvqMpcN1EQw7C2lda561FN9E7ZdM=",
"first_number"=>"1.0",
"second_number"=>"2.5",
"operation"=>"from_a_to_b",
"commit"=>"Beräkna",
"calculation_type_id"=>"vardag",
"id"=>"procent"}
나는 calculate.friendly_id.inspect를 올렸고 "procent"를 보여주었습니다.