Results 1 to 2 of 2

Thread: ExtJs?Rails????Validation??????????????????

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2010
    Posts
    29
    Vote Rating
    0
      0  

    Post ExtJs?Rails????Validation??????????????????

    //??????????????????Rails?????????????????????
    //????????????? m(_'_)m
    //-----------------------------------------------------------------------

    ExtJs?Rails??????Web?????????????????
    ???????????Validation?????????????????????

    Rails????scaffold?????????????Validation???????????
    ????????????????????
    ??? ?????i18n???????????????????????????
    [config/locales/ja.yml]
    activerecord:
    errors:
    ???...
    messages:
    ????....
    empty: "??????????"
    blank: "??????????"
    ????...
    [config/locales/translation_ja.yml]
    ja:
    activerecord:
    models:
    user: "????"
    attributes:
    user:
    name: "??"
    ???...
    ???scaffold??????????????????
    ????Validation????????????????????????
    ext_scaffold???????????????????????????
    ?Field??????????
    ?????????????????translation_ja.yml?????????
    ????????

    ???????????ext_to_jason?????????????????????
    ???????????????????????????????????????
    ???????
    ????????????????????

    ext_scafflold??????????
    ?????????????
    ????????????????????????????
    ?????????????

  2. #2
    Ext JS Premium Member
    Join Date
    Jun 2010
    Posts
    29
    Vote Rating
    0
      0  

    Default

    ??RES???

    ?????????????????????????????RES????????

    ext_scafflod?ext_to_jason???
    <???????????>\vendor\plugins\ext_scaffold\lib\ext_scaffold_core_extensions\active_record\base.rb
    ??????
    ?????
    ??result[field_key] ||= 'Field ' + Array(errors[error.first]).join(' and ')

    ???????????'Field'?????????????
    ?????????I18n???????
    ?s = I18n.t "activerecord.attributes.#{self.class.to_s.demodulize.underscore}.#{error.first}"
    ?result[field_key] ||= s + Array(errors[error.first]).join(' and ')

    ????translation_ja.yml??????????????????????

    ??????????????????????????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •