static_blocks 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -40
- data/app/controllers/static_blocks/snippets_controller.rb +1 -1
- data/app/models/static_blocks/snippet.rb +1 -1
- data/app/views/layouts/static_blocks/application.html.erb +7 -11
- data/app/views/static_blocks/snippets/index.html.erb +19 -7
- data/lib/static_blocks/engine.rb +1 -2
- data/lib/static_blocks/version.rb +1 -1
- data/lib/templates/static_blocks_config_template.rb +1 -2
- data/spec/dummy/config/initializers/static_blocks.rb +1 -2
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1027 -0
- data/spec/dummy/log/test.log +2667 -0
- data/spec/dummy/tmp/cache/assets/C16/1A0/sprockets%2F2601398660257e51059bc52de423d323 +0 -0
- data/spec/dummy/tmp/cache/assets/C3A/810/sprockets%2F605705bbd75a5708109a3052b34194a1 +0 -0
- data/spec/dummy/tmp/cache/assets/C4A/6A0/sprockets%2Ff6861a1825334631862c167ed0f7123a +0 -0
- data/spec/dummy/tmp/cache/assets/C5B/D30/sprockets%2F475c88209b37208f0f1bb0732794d949 +0 -0
- data/spec/dummy/tmp/cache/assets/C7D/7F0/sprockets%2F762ca18320b05c4dcb19345387d19748 +0 -0
- data/spec/dummy/tmp/cache/assets/C87/620/sprockets%2F3432446e738294254b2a8edee23c7809 +0 -0
- data/spec/dummy/tmp/cache/assets/C8A/300/sprockets%2F2104b69f493918404a1f8a87994a34bf +0 -0
- data/spec/dummy/tmp/cache/assets/C8E/D80/sprockets%2Fa97b8f843149ba7581718c5807e6007c +0 -0
- data/spec/dummy/tmp/cache/assets/C97/030/sprockets%2F8b75cc7d4c32fa7c8538195761991861 +0 -0
- data/spec/dummy/tmp/cache/assets/CA4/010/sprockets%2Fec5005e5e82c0615395661a01a3f92d5 +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/970/sprockets%2F310361768173cd7837ce83aab0f4072e +0 -0
- data/spec/dummy/tmp/cache/assets/CAF/250/sprockets%2F695cc7162198de1072eb5cc70e554341 +0 -0
- data/spec/dummy/tmp/cache/assets/CB2/D80/sprockets%2F41e9f52ea9e7407742900b1f1488b3e2 +0 -0
- data/spec/dummy/tmp/cache/assets/CB4/030/sprockets%2F5198c8563ad145d1ca5a0999f1081c84 +0 -0
- data/spec/dummy/tmp/cache/assets/CB7/EC0/sprockets%2Ff04c678e03c83de63443a48f3b462558 +0 -0
- data/spec/dummy/tmp/cache/assets/CBB/020/sprockets%2Fc9e97251131e812f35cf7549db3919d1 +0 -0
- data/spec/dummy/tmp/cache/assets/CC1/5A0/sprockets%2F880ce77a9b28981a952adc78253d1844 +0 -0
- data/spec/dummy/tmp/cache/assets/CC1/B10/sprockets%2Fc82b423336136d99f466dcb67288d90f +0 -0
- data/spec/dummy/tmp/cache/assets/CC1/ED0/sprockets%2Fa14463bb037619fa57b714120bb5a0c3 +0 -0
- data/spec/dummy/tmp/cache/assets/CC2/670/sprockets%2Fd17023a53879279ed0e7f7c1d89449e1 +0 -0
- data/spec/dummy/tmp/cache/assets/CC8/000/sprockets%2F0bc300758d430bde61301f61b6a854f2 +0 -0
- data/spec/dummy/tmp/cache/assets/CD0/8E0/sprockets%2F3b144a88ab6c3c65fe025106b19f6340 +0 -0
- data/spec/dummy/tmp/cache/assets/CD3/490/sprockets%2F11f03626112ce8ec543b893403ecc5b7 +0 -0
- data/spec/dummy/tmp/cache/assets/CD4/0C0/sprockets%2F5b406e951c5c1452140487cfc390b6bb +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/660/sprockets%2Fb453eb140b0090381fbc7f572e5c9661 +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/7F0/sprockets%2F91cbf8a76219141565d2050f22ad8cb6 +0 -0
- data/spec/dummy/tmp/cache/assets/CD7/CD0/sprockets%2Ffbbcc4143d456d7e91eb039048421408 +0 -0
- data/spec/dummy/tmp/cache/assets/CDD/F30/sprockets%2F20c297571db26285acd5e44d592cb571 +0 -0
- data/spec/dummy/tmp/cache/assets/CE7/A70/sprockets%2F2b55b09649b414608458f27adcf9ac47 +0 -0
- data/spec/dummy/tmp/cache/assets/CF5/810/sprockets%2F1e87820b7e288fa1d49739666e5c4ef0 +0 -0
- data/spec/dummy/tmp/cache/assets/CF5/A40/sprockets%2F80540873f80200acdaf0d11cb1374af6 +0 -0
- data/spec/dummy/tmp/cache/assets/CF8/F40/sprockets%2Fcd85cf389205869733d7734f74fcda62 +0 -0
- data/spec/dummy/tmp/cache/assets/D0F/D90/sprockets%2Fec736ab89a4058519037fdd4d1c823d1 +0 -0
- data/spec/dummy/tmp/cache/assets/D10/5B0/sprockets%2Fc41632729b685a6b9f83f2376a2cb1ea +0 -0
- data/spec/dummy/tmp/cache/assets/D10/7B0/sprockets%2Ff332d859577ad7cd06825164eac15ad2 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/6B0/sprockets%2F43f0522485f1d4839eb9206edb77bae2 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/9D0/sprockets%2F0bd4e6571b02cf9b6b48316e7b72e791 +0 -0
- data/spec/dummy/tmp/cache/assets/D12/F20/sprockets%2Ff3d21e291a835448de7d3bf5f2a43637 +0 -0
- data/spec/dummy/tmp/cache/assets/D1D/050/sprockets%2F7aedf7b498014e5974f4b67fa14c9305 +0 -0
- data/spec/dummy/tmp/cache/assets/D25/8D0/sprockets%2F44965f99238d4fe5ae23f67a444d39ad +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/110/sprockets%2Fcf56b560eb434174f78cb31aa14b4a80 +0 -0
- data/spec/dummy/tmp/cache/assets/D30/630/sprockets%2Fdddf26a6da0c736b28a04277c519502a +0 -0
- data/spec/dummy/tmp/cache/assets/D34/C00/sprockets%2Ffd8624610ba2f7fea171a7336aa9c514 +0 -0
- data/spec/dummy/tmp/cache/assets/D35/CF0/sprockets%2Ff8c2e0d9e9b09a4d909011da30179a0d +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/610/sprockets%2F225f057b56da34ed126f8a8a72bbd772 +0 -0
- data/spec/dummy/tmp/cache/assets/D3D/DB0/sprockets%2Fc14384add0f1e8058b73570b30efe86e +0 -0
- data/spec/dummy/tmp/cache/assets/D3F/A00/sprockets%2F76cd0753ec4a038a2799cd601fa20f9f +0 -0
- data/spec/dummy/tmp/cache/assets/D48/AB0/sprockets%2Fcd1c409688c2e7f51573253df4ceeb56 +0 -0
- data/spec/dummy/tmp/cache/assets/D4B/E90/sprockets%2F9646a1fde44362be74e65c29c32fc76d +0 -0
- data/spec/dummy/tmp/cache/assets/D4C/E90/sprockets%2Fa1e865b2d2df0fd8890664cd44594dc7 +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D50/470/sprockets%2F2bc1690c65d8ffbff84b58e810e63693 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/3D0/sprockets%2F85cb5c53462acba13e69b12b6e2c033d +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/C00/sprockets%2F38b0a785ceedf25123aa8dbd0105225f +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/EB0/sprockets%2Fa2a55bb00a9afe1277c704ec5a26665a +0 -0
- data/spec/dummy/tmp/cache/assets/D65/3F0/sprockets%2F26addecca4d7153fb4213e60f14d7836 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/620/sprockets%2Fae8bfc4eae4e4370718a5b285b671a40 +0 -0
- data/spec/dummy/tmp/cache/assets/D69/3E0/sprockets%2F9ef0b2abfb14b285d44545e60e527b9a +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/060/sprockets%2Fe0a029d4fd224317d9ab7f7b3494bbc8 +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/C40/sprockets%2Fc85440bcb573c1a5ff18a8fb6d4b4463 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/810/sprockets%2Fd72f757b547f05b2afd239df53dc104c +0 -0
- data/spec/dummy/tmp/cache/assets/D74/340/sprockets%2F8e95109cb57af4ae4835f02d6bd690ea +0 -0
- data/spec/dummy/tmp/cache/assets/D76/190/sprockets%2F62924e8c547bbdbc6ba9f43e8380cd35 +0 -0
- data/spec/dummy/tmp/cache/assets/D7C/A40/sprockets%2Fb6af372375f71d03dad8f965c57cdd48 +0 -0
- data/spec/dummy/tmp/cache/assets/D81/F30/sprockets%2Feaa8dfd5f795d67d05b5d472e6c74616 +0 -0
- data/spec/dummy/tmp/cache/assets/D8F/A00/sprockets%2F735fd88a014bbad648e3fc70ce500b1a +0 -0
- data/spec/dummy/tmp/cache/assets/D96/3E0/sprockets%2Fbdcbd241d62118ab9819ce5b4e571d1f +0 -0
- data/spec/dummy/tmp/cache/assets/D97/680/sprockets%2F73b5cca7c32a9fa7cbf0689d21e1507a +0 -0
- data/spec/dummy/tmp/cache/assets/D97/BF0/sprockets%2F5aa8691b0f5bcde047c02e61ccc3b698 +0 -0
- data/spec/dummy/tmp/cache/assets/D9B/230/sprockets%2Fac3e6f2c126af2f73741e0af8a8647bd +0 -0
- data/spec/dummy/tmp/cache/assets/DA2/820/sprockets%2F9f81de74a49c9eaf25ad2de0d51c7801 +0 -0
- data/spec/dummy/tmp/cache/assets/DA7/A20/sprockets%2F9a4213e2ca34fbdccf94e787e4b8d905 +0 -0
- data/spec/dummy/tmp/cache/assets/DB2/050/sprockets%2F488fb6ca52e64a450f4e6cdef9f33f77 +0 -0
- data/spec/dummy/tmp/cache/assets/DB9/DC0/sprockets%2F7b11eba5ddb8588ee93f2f9fd981744f +0 -0
- data/spec/dummy/tmp/cache/assets/DC3/420/sprockets%2Fcda0f30c4febfa63021ac95477b6a67e +0 -0
- data/spec/dummy/tmp/cache/assets/DD0/8A0/sprockets%2Faf86c34ca2afc966cf4370ee066b7ca6 +0 -0
- data/spec/dummy/tmp/cache/assets/DDB/AF0/sprockets%2F3d9bb34819e9dccdea7d83843e2f38ab +0 -0
- data/spec/dummy/tmp/cache/assets/DE9/4C0/sprockets%2Fc0b7ac80e6e22db7d45aaabd0e292d35 +0 -0
- data/spec/dummy/tmp/cache/assets/DF2/D90/sprockets%2F3dbeffd475c4732a6e7d135c5bdaa02c +0 -0
- data/spec/dummy/tmp/cache/assets/DF3/0E0/sprockets%2F1ad9adc3493cc790d41ed8f30d1cb4cc +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/5C0/sprockets%2Fcc26b95caff9bea54a9891d1deca0136 +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/E17/100/sprockets%2F4fdcad0d6a3aa1bb204d55aeb138ce88 +0 -0
- data/spec/dummy/tmp/cache/assets/E24/DE0/sprockets%2Fc0c5fa7230d2f5effad432d3d57ebfc3 +0 -0
- data/spec/dummy/tmp/cache/assets/E3A/B90/sprockets%2F9bdcbf9c44dd2be2eef54f7dfe363543 +0 -0
- data/spec/dummy/tmp/cache/assets/E3E/0C0/sprockets%2Fc750cada3b9dfe6be9889b8c58ce3bb5 +0 -0
- data/spec/dummy/tmp/cache/assets/E48/120/sprockets%2F8c212dcabdbe64b8ee23c80a07eeaac2 +0 -0
- data/spec/dummy/tmp/cache/assets/E73/350/sprockets%2F96ef0e2f5ca7f994efb9a4eeff6ce4a0 +0 -0
- data/spec/dummy/tmp/cache/assets/E8F/A80/sprockets%2Fbfa1b4d49773afea9f056ffebde0dcb5 +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/8d8913252dfda27698089d16357a002b63c38f3a/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c9e43dee1c22c9162e1aa6150501b7f78156a9fb/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eea23cb0c19a6988f2066af592c58a0ab56992d7/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/fb305f7e737beb652711bd2f585ff1d77871c181/bootstrap.scssc +0 -0
- data/spec/integration/translations_spec.rb +0 -9
- metadata +307 -4
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Static Blocks
|
2
2
|
|
3
|
-
Static Blocks is
|
3
|
+
Static Blocks is an ultra light-weight CMS for Ruby on Rails.
|
4
4
|
|
5
5
|
Create snippets of content. Place them anywhere in your views.
|
6
6
|
|
7
7
|
## Features
|
8
8
|
* Simple admin interface
|
9
|
-
* i18n
|
9
|
+
* i18n internationalization support
|
10
10
|
* Optional http basic authentication
|
11
11
|
* Search
|
12
12
|
* wysihtml5 editor
|
@@ -14,19 +14,19 @@ Create snippets of content. Place them anywhere in your views.
|
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
17
|
-
Add the following to
|
17
|
+
Add the following to Gemfile:
|
18
18
|
|
19
19
|
```ruby
|
20
20
|
gem 'static_blocks'
|
21
21
|
```
|
22
22
|
|
23
|
-
Run bundle:
|
23
|
+
Run bundle from shell:
|
24
24
|
|
25
25
|
```shell
|
26
26
|
bundle install
|
27
27
|
```
|
28
28
|
|
29
|
-
Run static blocks install generator:
|
29
|
+
Run static blocks install generator from shell:
|
30
30
|
|
31
31
|
```shell
|
32
32
|
rails generate static_blocks:install
|
@@ -38,7 +38,7 @@ Run migrations:
|
|
38
38
|
rake db:migrate
|
39
39
|
```
|
40
40
|
|
41
|
-
|
41
|
+
Ensure that engine is mounted in routes.rb:
|
42
42
|
|
43
43
|
```ruby
|
44
44
|
mount StaticBlocks::Engine => "/static_blocks"
|
@@ -57,65 +57,36 @@ Use the `snippet_for` method or it's alias `s` to output a block onto any view t
|
|
57
57
|
|
58
58
|
## Configuration
|
59
59
|
|
60
|
-
|
60
|
+
When you ran the install generator, a configuration file should have been created in config/initializers/static_blocks.rb:
|
61
61
|
|
62
62
|
```ruby
|
63
63
|
StaticBlocks.config do |config|
|
64
|
+
config.locales = ['en']
|
64
65
|
config.http_auth = false
|
65
66
|
config.username = ENV['STATIC_BLOCKS_USERNAME']
|
66
67
|
config.password = ENV['STATIC_BLOCKS_PASSWORD']
|
67
68
|
config.wysihtml5 = true
|
68
|
-
config.globalize = false
|
69
|
-
config.locales = ['en']
|
70
69
|
end
|
71
70
|
```
|
72
71
|
|
73
72
|
### i18n Internationalization
|
74
73
|
|
75
|
-
Static Blocks supports i18n internationalization.
|
76
|
-
|
77
|
-
#### Step 1
|
78
|
-
|
79
|
-
Set globalize option to true.
|
80
|
-
|
81
|
-
```ruby
|
82
|
-
config.globalize = true
|
83
|
-
```
|
84
|
-
|
85
|
-
#### Step 2
|
86
|
-
|
87
|
-
Pass in an array of locales.
|
74
|
+
Static Blocks supports i18n internationalization. Pass in an array of locales to it's config option:
|
88
75
|
|
89
76
|
```ruby
|
90
77
|
config.locales = ['en', 'wk', 'pirate']
|
91
78
|
```
|
92
79
|
|
93
|
-
#### Step 3
|
94
|
-
|
95
|
-
Skip this step if you are starting without any existing snippets. If you are enabling i18n on a site with existing snippets, you must export and import the snippets in order to copy them to the default locale.
|
96
|
-
|
97
80
|
### Optional http basic authentication
|
98
81
|
|
99
|
-
Static Blocks has an optional http basic authentication which is turned off by default. To activate, set the
|
82
|
+
Static Blocks has an optional http basic authentication which is turned off by default. To activate, set the config option to true and create environment variables for the username and password.
|
100
83
|
|
101
84
|
```ruby
|
102
85
|
config.http_auth = true
|
103
86
|
```
|
104
87
|
|
105
|
-
If you are using Devise and prefer to use that instead, you could probably do something like this in `config/routes.rb`:
|
106
|
-
|
107
|
-
```ruby
|
108
|
-
authenticate :admin_user do
|
109
|
-
mount StaticBlocks::Engine => "/static_blocks"
|
110
|
-
end
|
111
|
-
```
|
112
|
-
|
113
88
|
### wysihtml5 editor
|
114
|
-
Static Blocks uses the wysihtml5 editor which is turned on by default. To deactive, set the
|
115
|
-
|
116
|
-
```ruby
|
117
|
-
config.wysihtml5 = false
|
118
|
-
```
|
89
|
+
Static Blocks uses the wysihtml5 editor which is turned on by default. To deactive, set the config option to false.
|
119
90
|
|
120
91
|
## Credits
|
121
92
|
Created by Travis Luong
|
@@ -67,7 +67,7 @@ module StaticBlocks
|
|
67
67
|
# GET /static_blocks.json
|
68
68
|
def index
|
69
69
|
@search = Snippet.order('title asc').search(params[:q])
|
70
|
-
@snippets = @search.result
|
70
|
+
@snippets = @search.result.per_page_kaminari(params[:page]).per(10)
|
71
71
|
|
72
72
|
respond_to do |format|
|
73
73
|
format.html # index.html.erb
|
@@ -17,9 +17,7 @@
|
|
17
17
|
<li><%= link_to "List snippets", snippets_path %></li>
|
18
18
|
<li><%= link_to "New snippet", new_snippet_path %></li>
|
19
19
|
<li><%= link_to "Export snippets", export_snippets_path(:format => :csv) %></li>
|
20
|
-
|
21
|
-
<li><%= link_to "Export translations", export_translations_snippets_path(:format => :csv) %></li> </ul>
|
22
|
-
<% end %>
|
20
|
+
<li><%= link_to "Export translations", export_translations_snippets_path(:format => :csv) %></li> </ul>
|
23
21
|
</div><!--/.nav-collapse -->
|
24
22
|
</div>
|
25
23
|
</div>
|
@@ -36,15 +34,13 @@
|
|
36
34
|
<% end %>
|
37
35
|
<% end %>
|
38
36
|
|
39
|
-
|
40
|
-
<
|
41
|
-
<strong>Locale:</strong>
|
37
|
+
<div id="locale" class="well well-small">
|
38
|
+
<strong>Locale:</strong>
|
42
39
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<% end %>
|
40
|
+
<% StaticBlocks.config.locales.each do |loc| %>
|
41
|
+
<%= link_to_unless_current loc, locale: loc %>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
48
44
|
|
49
45
|
<%= yield %>
|
50
46
|
|
@@ -2,7 +2,21 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="span6">
|
4
4
|
<h2>Search</h2>
|
5
|
-
<%=
|
5
|
+
<%= search_form_for @search do |f| %>
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :title_cont, "Title contains" %>
|
8
|
+
<%= f.text_field :title_cont %>
|
9
|
+
</div>
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :translations_content_cont, "Content contains" %>
|
12
|
+
<%= f.text_field :translations_content_cont %>
|
13
|
+
</div>
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :status_cont, "Status contains" %>
|
16
|
+
<%= f.select(:status_cont, [['', ''], ['Draft', 'draft'], ['Published', 'published']]) %>
|
17
|
+
</div>
|
18
|
+
<div class="actions"><%= f.submit "Search" %></div>
|
19
|
+
<% end %>
|
6
20
|
</div>
|
7
21
|
<div class="span6">
|
8
22
|
<h2>Import snippets</h2>
|
@@ -10,12 +24,10 @@
|
|
10
24
|
<%= file_field_tag :file %>
|
11
25
|
<%= submit_tag "Import snippets" %>
|
12
26
|
<% end %>
|
13
|
-
|
14
|
-
|
15
|
-
<%=
|
16
|
-
|
17
|
-
<%= submit_tag "Import translations" %>
|
18
|
-
<% end %>
|
27
|
+
<h2>Import translations</h2>
|
28
|
+
<%= form_tag import_translations_snippets_path, multipart: true do %>
|
29
|
+
<%= file_field_tag :file %>
|
30
|
+
<%= submit_tag "Import translations" %>
|
19
31
|
<% end %>
|
20
32
|
<p class="help-block">*If you are using translations, you must import snippets first and then translations.</p>
|
21
33
|
</div>
|
data/lib/static_blocks/engine.rb
CHANGED
@@ -24,12 +24,11 @@ module StaticBlocks
|
|
24
24
|
def self.config(&block)
|
25
25
|
unless defined? @@config
|
26
26
|
@@config ||= StaticBlocks::Engine::Configuration.new
|
27
|
+
@@config.locales = ['en']
|
27
28
|
@@config.http_auth = false
|
28
29
|
@@config.username = "admin"
|
29
30
|
@@config.password = "password"
|
30
31
|
@@config.wysihtml5 = true
|
31
|
-
@@config.globalize = false
|
32
|
-
@@config.locales = ['en']
|
33
32
|
end
|
34
33
|
|
35
34
|
yield @@config if block
|
@@ -1,8 +1,7 @@
|
|
1
1
|
StaticBlocks.config do |config|
|
2
|
+
config.locales = ['en']
|
2
3
|
config.http_auth = false
|
3
4
|
config.username = ENV['STATIC_BLOCKS_USERNAME']
|
4
5
|
config.password = ENV['STATIC_BLOCKS_PASSWORD']
|
5
6
|
config.wysihtml5 = true
|
6
|
-
config.globalize = false
|
7
|
-
config.locales = ['en']
|
8
7
|
end
|
Binary file
|