dynamic-fields-for 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +17 -15
- data/lib/dynamic-fields-for/feature.rb +18 -18
- data/lib/dynamic-fields-for/version.rb +1 -1
- data/spec/rails_app/app/controllers/email_forms_controller.rb +1 -1
- data/spec/rails_app/app/controllers/users_controller.rb +3 -5
- data/spec/rails_app/config/application.rb +0 -5
- data/spec/rails_app/config/boot.rb +0 -6
- data/spec/rails_app/config/environments/production.rb +1 -3
- data/spec/rails_app/config/environments/test.rb +2 -4
- data/spec/rails_app/config/initializers/secret_token.rb +1 -5
- data/spec/rails_app/db/migrate/001_create_tables.rb +1 -1
- data/spec/rails_app/log/test.log +4614 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/-I/-IieEOiod5rNBt85BhWlmCuCBaPA0Yv8IOyEm8mRhzA.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/1c/1c2lLxPxDclehdV2kK6wqPkGvnA4ZIOSYa3N7ZwDpi0.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/4V/4Vo7yq3CjR8kxl0C2KD1a2xWebM6mY4QckW3P0iOEm0.cache +3 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/7X/7X9A2htTTKoBCzSDcOCRDi-uBeiigzw-EPz-cjGLlsc.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/9N/9Nt_tmgf8aEaiLfSkJbU59VARWtqxW2fA2dOZB2j_vo.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/A9/A97OKli1bonNWvA7zBapPCO6dy4qtsAoyKl_1JrZaGc.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/BW/BWLlgE8bUyNcBrLOqp9FZ4roZ7ul7_CGaCOY5Hi9uto.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Bj/Bjt7ivGCRDUDyOryUXx9cR5u3z7tmRfFhHbQ3terqzo.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Cj/CjkeJR4M1vz3NV7buqh5wgcsE3D-Yljuf7c3I0EVW2I.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Cx/CxL9zMETn8gISEmkXKWSGUaG-ifjK5yoF06T4ZDach8.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/FJ/FJhCB0hon1A8Ae0Wzw3cYWOnb_K8PWYWw6uy2i5UNYk.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Fe/FeEIIgK4Plzksh4QZdb6iMXuP4RVq4WLxptIXfsF7H0.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/HV/HVjIALfiG3xZlyY50MGxyKJoipUttcc_FnVdEVOUQtA.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Iv/IvcBt1U5bMbt5ok3sjNBSo2MAjtsTxy-jzY_CcQRYRg.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/LD/LDPxeOPw6gSBdToeY6UnOojzjOx72t3moTnpeosIbbE.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/LN/LNOAbPi46cQc4hdSTMjmJWKM7iAqy0MPZL80Z6NVjcg.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Nu/NuWiP6_Eh1k3xHVshO_Ybf0Ti6u6lYZ1RPhpKbQwBGg.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/OZ/OZjpA4Ur2AnpcDeCGKJuAbICkJK238E455hrDTqJnqc.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Ol/Olig1k-C0BF8cwxOUU0lGE8ozreazgmYgMnX0bAWVg4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/QE/QEgWPZjJG6xF2yIemOY3n6d0B40YzYPuscVBmHT2JQQ.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/QE/qEs5D-5vlVV0CSSlgcW2FQbTYK7nP6bQF8flZ-Bmpk0.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/QK/QKEUXM9GzIMurEJ2BFhwHZ7nZlvYyD2DQjfyRQIsUOY.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Tn/Tn2o9ZXvvr2ZwdXC-jNpedOaDhFLiBsTlCOEfZgYaO4.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/VP/VP_53KUrfj0_N33hhw_wEZzlWw5h5E0RJycYYy_U5bg.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/W5/W5-easWZqaQCdHRcl4B1Yz5A3qm7na6rhlepDQFOuZg.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/Yr/YrbiRaALCT_P9xP0Su82Wc0VFj6_LhAqbnbk7xiG9jY.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/_B/_BJR6vn36vgldHRgnFe0Oztv-wU0t4daWKJsR-xkqZc.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/_k/_kDf0wogoa183KYnSOO9mvSZLugKS0EsX_4055uzqPo.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/_w/_wCdW4aV1IYVph8UK5jk0M7Ua0BPvWNnJnC_BM40W8c.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/aO/aOLZm7L38t4Pgd21hp_ihos82188bVKAPtaTc1acMck.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/aR/aROgw_hk3jcF-dw_WMr0_DNnsh1l4B0t6OnWhRcuiCo.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/bT/bTmWUJvj67bFwD_RLmDLxgz740JZS8x5KIaIvlQQZCs.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/bv/bvJRH2VBuhMfLalApZFPKXGAUp7jpbwypQjiOVaM2uM.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/cD/cDT8gAQ60LH3oJN3N4HiK_dllMy8wPvTNeX_5ySYRZI.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/dk/dka5TOBmzgtCKbl3YCgZvyt5_pnskV2HRxKC0MYK4Dk.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/fH/fHUjGM9Mkomjc625O2uw-o4eNXopwxqv5Jp4_BgA0r4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/hW/hWKdQ6Psz33fIP4pAA0HtIZF4qaBuBqdyqh6RN0rb9o.cache +7 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/i-/i-_MvPOBR47C89ASLMA7guC4Wof5UfTx6lN0bIaqaYo.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/iF/iFOMbhBvhIF4OHGQnAjAtHsFBhDq4fNdchiyXerkp3k.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/le/leB9k6JD9auLCZ145aMU0GKv0egdzvAwIAivjyd3Dao.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/m1/m11CrPSm5YADftjXDCfgNUlCzNkjfg11XK7wJcDG9i8.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/n0/n0WBaJpP_a99U502e-u8efrstNCE5FaAKO3L2vBnuWs.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/ru/ruIwxrgsRe5JSasIyk9hA-8wx4b9uxlLZTSzZpbqrKg.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/s7/s7RTYL464Njy_m2riL6FOsFrys1pJNP6ZC0NNHMgm-c.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/sR/sRo0X0Hr85ulDBq14slGDrJMHs9fLmTEjJi1ZIQwmfA.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/sh/shbXoDJ9JKbPXNSerRACIr55ChXjjArXpHeeUBRWQT0.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/t9/t9Fx8q9GefLSCvwP9of6uMzOz9eRuJxb0qBCBaH8Ato.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/u2/u2B54ds9F6w2P4HVhIcmm8YntI_D5jZiGUmS2pfQ9r0.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/ur/urc25YWiirIG0lqx_7clzY4rOKVoS6YPAfLalkFiiz0.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/wT/wTFhIO075ztnSt8SF8ypnrU5nnTNh4vCP2IuSAZR7hA.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/wZ/wZL83pC_jhEG3hEztv48sQ66ewUANnnHgOB9U7T98p8.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/y5/y5u3wS7NKlrIrwD5Qr4YIjF9RqNArSIBQqO-esOeTcQ.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/sprockets/v3.0/zY/zYjJ60drVvagzjEvcth1BP5W1lCbzaTo5fFndp3zA6I.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/-y2Nj-oEzB9VFSZnYrq8rc1mH47QvvXnIGplgmnnsx0.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/0WbO41G5EquQoaWDmXCrTJ8MUYyW04iHPH1hM7frM7k.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/1CnJYCizhgnzisqtfOGLR9Ogyv2xsObnGOKRkDrUTS4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/25X4tCGlSjx1UfwomElT3iuFp6cfPwuwbS1ydStgd6U.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/2tghCTqAN5NM_i0FOKQkI1OfxU9jM0Pb2yZc7PAzR5I.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/3NHIrwfCNACq0IcS1oqTYv7zsApMyndizmVZDyKnDLo.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/5aLeXQCvW2SzFWiz2Il2IG7rBxIWh-7ACBDGG9EwU-Y.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/62WouuqhUZIbyQdajAC9hQYu3crCYpPQBUDEXAkqqCQ.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/9AHsClwaruG2kM8RK5WNJfGEL3QvPPXrNZBJnF3sSVk.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/B_LoDCJlBAyqhJW_aqeRkQono8j3I8l5gBrUIoaoIrc.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/C3K8xXtEw_uX_3vz1_UPoz_D-n8NYWerIVVfMD2ocf4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/CHhx17oFruciRWwHa9Af0c6OBGPRKmfpUhTEzZ5a0oE.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/D-k3wjyM4hDL-Xa8aOjGSKvDPMdifrbsWM5ZOv7RdfI.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/F1AiJu9Z_Vg6o-TXi_FK_7NbpQF-8Ps3ZgZresPI7bk.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/FYUHomHkOkJoXSJsdKxFoxwG51XHVBYw340A-RvpOd0.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/F_-LX9THlY4eew_4wS8vyAARs16KKGWr7Zs0nZBYdgk.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/HF_Rn0dDLWPJT7K59zqHj9v_KSF3xXPWXgv5Hf5jcj4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Hf1f3nuKuHCCadndCoXKqmCT1z-bRhliThQKIsy8dDc.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/I-E7sfjG18CUsYDvz1rubsejSCYYWW5l5AKwS8LdevI.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/JR0sj-qCeMYM3yzAsTuceTkAi12BidCMDshlUofyXDI.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/K5sP-TjHoKKFcZ8bIRePS1__C9Dupwi-CG5AfD6sie4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/KUQMVBqIXYFitBkJ0S3cwTlwixMBWJ9JQEauefA8v4I.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/KolW_5qHtaMjWJ9I0byKf3-hxyZUNrAoLw0wZl5p4jE.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/LP8iN0ODPqX3_lng9oKse0mqg8ii1Q9sPlFFofeygyM.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/Nl3IfKaoI-7d5YL0GI9cTbyBhHe6RW7La6HuZ0zWn54.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/OZjpA4Ur2AnpcDeCGKJuAbICkJK238E455hrDTqJnqc.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/R10HX6jRYVcx4i5ZdcCFaPg6Dclv6HUnrq82WFTs1A8.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/SW9GlWefEXZvkSZn6Hy6YI4MxH3HLQDKSEl9v5CTZK0.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/TMjt4uJuj6wxYVBL6kOWG3JWVMavq3ARGHYSr0VVINs.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/YfQNysBckv9Y6n3wZbPmNTKHAL2w08RL-KINY7BOA8k.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/YrbiRaALCT_P9xP0Su82Wc0VFj6_LhAqbnbk7xiG9jY.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/_ZSG36VDwTPLjVkw1Nk_OX-o8Ub8J1df2TqmZ9T8C3Y.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/_jgsX8JLu0AF6_6IIgC7RpiGdTdafKZ0Fuy-PM3R4ew.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/aGTeQQKh5xRHcnhGSOqCY5RDB296_8EcD9QbgH1y-K4.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/cemFcgE_zsZY5fSnE_Z1F8NUguDwxGF2rRXZi7obraM.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/d2todwJVSZ9N-ZNqX1-aPImN-j4vlkWFqZqF1e2zPvs.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/e1_fgpa4PJ7FxrvKOeMLMAe3kGGT4-HkpaGuzDbMFqc.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/eRoyTy53p0g2MugwzwGVCGRepC62GjzF1cC6QPCrdq4.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fPLJ4eRQVzgLA54UdpsPXE1lqjP8pb7TP7vNXAUftH8.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/f_YCIruAVLS1lTySUCdS2krzHXI-LtP8YmYitpu7Q_Y.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/fqhpMpVEwYha3QXKhn_Ku-WcZussINDmm-v0v6oKSQ8.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/gUmernoVZM4F68yffl6e8TdqXWJTu6rlKMeTPO5KMts.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/h9YpmWGI1TNFUzamnYVaELjP-aedydi5r2Nn31C254c.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/hGiAsNthPsCBozGz2o9aIWrf0sQkkOpF3SR5gQZiARs.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/jwmwZZzJSocUjr59zGFa5xJa4GyY40Z3qnqyMw2EAjA.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/kSA_lWOxQplaWy8TNzv0UrI0KYdP40MW3AdG-RbebTc.cache +3 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/kbwwyZBf8zhW4e9q_meAv5JVQ99FzN-9F47646b1pBw.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/khOpB276ElPRW1VFdIuu9Eu4ptxZV9swIJmg64xbITw.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/lmmGREMiRUlQqEPcKo5GXl3ZYVz02p9jdcbSYxtOkEk.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mLMAOnbry-WtMxDv2CS7cUuiFckg5TYiQp71coq94FA.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mVCJk5BpD2jLntvxHSWaF8YWUqdSWX8lOLq4zKkTDrI.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/mhSf7nIcUxNa6U6Q5yACIKn8QfNe2INZmP6l0QOwKLU.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/n8nOk1RjgEO78-0PPYPpRSqS9n1NToVWfKgLlovHTSQ.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/p58v7K_gxNI8XJbnTf_F6DjEEwThIe1N4GWNDZvs_f0.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/pBQL9nBLw8t_QdFpO5GQKy6Zd9H93dQbARmAFSKvQZM.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/qPjyW0sqKLF_koGEYacxrcwWU60QCfFEwfVXStO1K3I.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/r2PSEshTzE_seFQEnxGvhW3PWHhxB5aMoXA1X2TfT5I.cache +2 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/tYynIC98q8djLKvePU7FznC4IhiVJTQVtwmzO91_ESc.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/toftN9uOacOSKqASXLr-UEzskBTeHvO_DDIxpIuosC0.cache +1 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/w-YrR3qkTBU4yk3zUMbKR-1bIHXDxxUG3zzhatV6ZWo.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/xQsaBLV74ZqLgT3Eun0fpTlVIHoMdFKugQaxf7aL8ac.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/xdKG1KCAGap_cZukpvSDIF3plUlkXsl7RqijvO4CJ5k.cache +0 -0
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/ySJMBl8_8f1TC2JeQF-Rnp4A9M84cYN97jeVikGSTus.cache +3 -1
- data/spec/rails_app/tmp/cache/assets/test/sprockets/v3.0/zSQXQijzhvPIyjMeZe0GDybcX_HMa1N7zyrMFN-KKzI.cache +0 -0
- metadata +477 -245
- data/spec/rails_app/tmp/pids/server.pid +0 -1
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: f6204fd4811cad2ba7c7d5aa03677c3eb3e145ed
|
|
4
|
+
data.tar.gz: ef51c7370fca9cbcc628a0cf260ff69c67920ade
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d175c524a83222f4f8487bf7ec04c50f19fe20d9fa3f5062c9489c54149cbf948a00139bf35b24866d2e675fb077568647f3d7c85371795bb487b3eb549e3de7
|
|
7
|
+
data.tar.gz: f92f325cd60f61817e52adc7aae0ad893c604a48e8c4323274214c7b2616253cab5130b0fff0e6594719bcd1a4c7400004260edeb34c25b115cf137a1c44a8ee
|
data/README.md
CHANGED
|
@@ -5,27 +5,29 @@ DynamicFieldsFor
|
|
|
5
5
|
[](https://codeclimate.com/github/stokarenko/dynamic-fields-for)
|
|
6
6
|
[](https://codeclimate.com/github/stokarenko/dynamic-fields-for/coverage)
|
|
7
7
|
|
|
8
|
-
DynamicFieldsFor is a Rails plugin which provides the dynamic association fieldsets to your forms without
|
|
8
|
+
DynamicFieldsFor is a Rails plugin which provides the dynamic association fieldsets to your forms without pain. And it does nothing else.
|
|
9
9
|
|
|
10
10
|
The main features are:
|
|
11
|
-
*
|
|
12
|
-
* Works with fields block, i.e.
|
|
13
|
-
*
|
|
11
|
+
* Doesn't break the HTML layout - no wrappers, additional divs etc;
|
|
12
|
+
* Works with fields block, i.e. doesn't require the separated partial for them;
|
|
13
|
+
* Doesn't provide new form helpers, but extends the existing one;
|
|
14
14
|
* Simple and predictable interface and behavior;
|
|
15
|
-
*
|
|
15
|
+
* Doesn't require any special HTML entities inside templates;
|
|
16
16
|
* Supports [Simple Form](https://github.com/plataformatec/simple_form).
|
|
17
17
|
* Supports not ActiveRecord models
|
|
18
18
|
|
|
19
19
|
## Alternatives
|
|
20
|
-
* [
|
|
20
|
+
* [cocoon](https://github.com/nathanvda/cocoon)
|
|
21
21
|
* [Nested Form](https://github.com/ryanb/nested_form)
|
|
22
22
|
|
|
23
23
|
## Dependencies
|
|
24
|
-
* Ruby >=
|
|
25
|
-
* [rails](https://github.com/rails/rails) >=
|
|
24
|
+
* Ruby >= 2.2.2
|
|
25
|
+
* [rails](https://github.com/rails/rails) >= 5.0.0
|
|
26
26
|
* [jquery-rails](https://github.com/rails/jquery-rails)
|
|
27
27
|
* [activerecord-devkit](https://github.com/stokarenko/activerecord-devkit), `association_soft_build` feature
|
|
28
28
|
|
|
29
|
+
For older versions of ruby and rails - please use gem version `1.1.0`.
|
|
30
|
+
|
|
29
31
|
## Getting started
|
|
30
32
|
|
|
31
33
|
Add to your Gemfile:
|
|
@@ -56,7 +58,7 @@ class Role < ActiveRecod::Base
|
|
|
56
58
|
end
|
|
57
59
|
```
|
|
58
60
|
|
|
59
|
-
First, apply `inverse_of` to User's `:roles` associations, otherwise no chance to pass
|
|
61
|
+
First, apply `inverse_of` to User's `:roles` associations, otherwise there is no chance to pass
|
|
60
62
|
the validation of Role's user presence on user creation:
|
|
61
63
|
```ruby
|
|
62
64
|
class User < ActiveRecord::Base
|
|
@@ -71,7 +73,7 @@ accepts_nested_attributes_for :roles, allow_destroy: true
|
|
|
71
73
|
|
|
72
74
|
Skip `allow_destroy` definition if you don't need to use `remove_fields_link` helper).
|
|
73
75
|
|
|
74
|
-
Take care about strong parameters in controller like
|
|
76
|
+
Take care about strong parameters in controller like this:
|
|
75
77
|
```ruby
|
|
76
78
|
params.require(:user).permit(roles_attributes: [:id, :_destroy])
|
|
77
79
|
```
|
|
@@ -108,7 +110,7 @@ DynamicFieldsFor supports SimpleForm:
|
|
|
108
110
|
```
|
|
109
111
|
|
|
110
112
|
## Not ActiveRecord models
|
|
111
|
-
To use DynamicFieldsFor with not ActiveRecord,
|
|
113
|
+
To use DynamicFieldsFor with not ActiveRecord, it's necessary to define two methods in your model, `{association}_soft_build` and `{association}_attributes=`:
|
|
112
114
|
|
|
113
115
|
```ruby
|
|
114
116
|
class EmailForm
|
|
@@ -150,12 +152,12 @@ Template will stay to be as usual:
|
|
|
150
152
|
## JavaScript events
|
|
151
153
|
There are the events which will be triggered on `add_fields_link` click, in actual order:
|
|
152
154
|
* `dynamic-fields:before-add-into` touched to dynamic fields parent node;
|
|
153
|
-
* `dynamic-fields:after-add` touched to each first-level elements which
|
|
155
|
+
* `dynamic-fields:after-add` touched to each first-level elements which were inserted;
|
|
154
156
|
* `dynamic-fields:after-add-into` touched to dynamic fields parent node;
|
|
155
157
|
|
|
156
158
|
Like that, these events will be triggered on `add_fields_link` click, in actual order:
|
|
157
159
|
* `dynamic-fields:before-remove-from` touched to dynamic fields parent node;
|
|
158
|
-
* `dynamic-fields:before-remove` touched to each first-level elements which going to be removed;
|
|
160
|
+
* `dynamic-fields:before-remove` touched to each first-level elements which are going to be removed;
|
|
159
161
|
* `dynamic-fields:after-remove-from` touched to dynamic fields parent node;
|
|
160
162
|
|
|
161
163
|
Typical callback for dynamic fields parent node looks like:
|
|
@@ -165,7 +167,7 @@ $(document).on('dynamic-fields:after-add-into', function(event){
|
|
|
165
167
|
})
|
|
166
168
|
```
|
|
167
169
|
|
|
168
|
-
As for first-level elements,
|
|
170
|
+
As for first-level elements, compatible callbacks
|
|
169
171
|
will be triggered to each of them. To deal with this,
|
|
170
172
|
use `$.find2` javascript helper, which provided by DynamicFieldsFor:
|
|
171
173
|
```js
|
|
@@ -174,7 +176,7 @@ $('#some_id').find2('.some_class');
|
|
|
174
176
|
$('#some_id').find('.some_class').add($('#some_id').filter('.some_class'));
|
|
175
177
|
```
|
|
176
178
|
|
|
177
|
-
Typical event callback first-level elements should
|
|
179
|
+
Typical event callback first-level elements should look like:
|
|
178
180
|
```js
|
|
179
181
|
$(document).on('dynamic-fields:after-add', function(event){
|
|
180
182
|
$(event.target).find2('.datepicker').datetimepicker();
|
|
@@ -4,17 +4,12 @@ RubyFeatures.define 'dynamic_fields_for' do
|
|
|
4
4
|
|
|
5
5
|
apply_to 'ActionView::Helpers::FormBuilder' do
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
alias_method_chain :fields_for_nested_model, :dynamic_fields
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
instance_methods do
|
|
13
|
-
def fields_for_with_dynamic_fields(association, record_object = nil, options = {}, &block)
|
|
7
|
+
rewrite_instance_methods do
|
|
8
|
+
def fields_for(association, record_object = nil, options = {}, &block)
|
|
14
9
|
#Inherit the native parameters adjustment
|
|
15
10
|
options, record_object = record_object, nil if record_object.is_a?(Hash) && record_object.extractable_options?
|
|
16
11
|
|
|
17
|
-
return
|
|
12
|
+
return super(association, record_object, options, &block) unless options.delete(:dynamic)
|
|
18
13
|
|
|
19
14
|
soft_build_method_name = :"#{association}_soft_build"
|
|
20
15
|
new_object = @object.respond_to?(soft_build_method_name) ?
|
|
@@ -22,16 +17,16 @@ RubyFeatures.define 'dynamic_fields_for' do
|
|
|
22
17
|
@object.association(association).soft_build
|
|
23
18
|
|
|
24
19
|
options[:child_index] = 'dynamic_fields_index'
|
|
25
|
-
remove_template =
|
|
20
|
+
remove_template = super(association, new_object, options) do |f|
|
|
26
21
|
f.hidden_field(:id, value: 'dynamic_fields_object_id') +
|
|
27
22
|
f.hidden_field(:_destroy, value: true)
|
|
28
23
|
end
|
|
29
24
|
|
|
30
25
|
options[:dynamic_fields_id] = dynamic_fields_id(association)
|
|
31
|
-
add_template =
|
|
26
|
+
add_template = super(association, new_object, options, &block)
|
|
32
27
|
|
|
33
28
|
options.delete(:child_index)
|
|
34
|
-
collection_output =
|
|
29
|
+
collection_output = super(association, record_object, options, &block)
|
|
35
30
|
|
|
36
31
|
cover_by_anchors(
|
|
37
32
|
{
|
|
@@ -44,6 +39,18 @@ RubyFeatures.define 'dynamic_fields_for' do
|
|
|
44
39
|
)
|
|
45
40
|
end
|
|
46
41
|
|
|
42
|
+
private
|
|
43
|
+
|
|
44
|
+
def fields_for_nested_model(name, object, fields_options, block)
|
|
45
|
+
cover_by_anchors_if(
|
|
46
|
+
fields_options.has_key?(:dynamic_fields_id),
|
|
47
|
+
{'item-begin' => fields_options[:dynamic_fields_id]},
|
|
48
|
+
super(name, object, fields_options, block)
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
instance_methods do
|
|
47
54
|
def add_fields_link(association, label, options = {})
|
|
48
55
|
@template.link_to(label, '#', dynamic_fields_data_options(add: dynamic_fields_id(association)).deep_merge(options))
|
|
49
56
|
end
|
|
@@ -59,13 +66,6 @@ RubyFeatures.define 'dynamic_fields_for' do
|
|
|
59
66
|
@template.link_to(label, '#', dynamic_fields_data_options(anchor_options).deep_merge(options))
|
|
60
67
|
end
|
|
61
68
|
|
|
62
|
-
def fields_for_nested_model_with_dynamic_fields(name, object, fields_options, block)
|
|
63
|
-
cover_by_anchors_if(
|
|
64
|
-
fields_options.has_key?(:dynamic_fields_id),
|
|
65
|
-
{'item-begin' => fields_options[:dynamic_fields_id]},
|
|
66
|
-
fields_for_nested_model_without_dynamic_fields(name, object, fields_options, block)
|
|
67
|
-
)
|
|
68
|
-
end
|
|
69
69
|
|
|
70
70
|
private
|
|
71
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class UsersController < ApplicationController
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
before_action :build_resource, only: [:new, :create]
|
|
3
|
+
before_action :load_resource, except: [:new, :create]
|
|
4
4
|
|
|
5
5
|
def new
|
|
6
6
|
3.times{ @resource.roles.build }
|
|
@@ -31,8 +31,6 @@ class UsersController < ApplicationController
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def resource_params
|
|
34
|
-
|
|
35
|
-
params.fetch(:user, {}).permit(:user_name, roles_attributes: [:id, :role_name, :_destroy]) :
|
|
36
|
-
params[:user]
|
|
34
|
+
params.fetch(:user, {}).permit(:user_name, roles_attributes: [:id, :role_name, :_destroy])
|
|
37
35
|
end
|
|
38
36
|
end
|
|
@@ -19,10 +19,5 @@ module RailsApp
|
|
|
19
19
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
20
20
|
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', "**", '*.{rb,yml}').to_s]
|
|
21
21
|
# config.i18n.default_locale = :de
|
|
22
|
-
|
|
23
|
-
# Enable the asset pipeline
|
|
24
|
-
unless DynamicFieldsFor.rails4?
|
|
25
|
-
config.assets.enabled = true
|
|
26
|
-
end
|
|
27
22
|
end
|
|
28
23
|
end
|
|
@@ -20,9 +20,7 @@ RailsApp::Application.configure do
|
|
|
20
20
|
# config.action_dispatch.rack_cache = true
|
|
21
21
|
|
|
22
22
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
|
23
|
-
|
|
24
|
-
config.serve_static_files = false :
|
|
25
|
-
config.serve_static_assets = false
|
|
23
|
+
config.public_file_server.enabled = false
|
|
26
24
|
|
|
27
25
|
# Compress JavaScripts and CSS.
|
|
28
26
|
config.assets.js_compressor = :uglifier
|
|
@@ -13,10 +13,8 @@ RailsApp::Application.configure do
|
|
|
13
13
|
config.eager_load = false
|
|
14
14
|
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
config.serve_static_assets = true
|
|
19
|
-
config.static_cache_control = 'public, max-age=3600'
|
|
16
|
+
config.public_file_server.enabled = true
|
|
17
|
+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
|
20
18
|
|
|
21
19
|
# Show full error reports and disable caching.
|
|
22
20
|
config.consider_all_requests_local = true
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
RailsApp::Application.config.secret_key_base = '8cec03a73bd1f8cdf2c519131bb5475775684177ce99c27c254e9617313950f06972cd0e027ea5627570b133f8d5385bd5aaec119351f65bec03a0facb0de559'
|
|
3
|
-
else
|
|
4
|
-
RailsApp::Application.config.secret_token = '8cec03a73bd1f8cdf2c519131bb5475775684177ce99c27c254e9617313950f06972cd0e027ea5627570b133f8d5385bd5aaec119351f65bec03a0facb0de559'
|
|
5
|
-
end
|
|
1
|
+
RailsApp::Application.config.secret_key_base = '8cec03a73bd1f8cdf2c519131bb5475775684177ce99c27c254e9617313950f06972cd0e027ea5627570b133f8d5385bd5aaec119351f65bec03a0facb0de559'
|