{"id":331575,"date":"2022-04-06T09:00:52","date_gmt":"2022-04-06T09:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=331575"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=331575","title":{"rendered":"<span>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 \u00ab\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c\u00bb. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap \u2014 \u0437\u0430 \u0447\u0430\u0441<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u0442\u043e\u0442 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u0442 \u0432\u0430\u0441, \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c, \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Ruby on Rails 6 \u0438 Bootstrap 5; \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c,\u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u044d\u0442\u043e\u0442 rails-app \u043e\u0431\u043b\u0430\u0434\u0430\u043b, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u044f\u0434\u043e\u043c \u043e\u043f\u0446\u0438\u0439, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ActiveAdmin. \u0414\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043a\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438\u043b\u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u0447\u044c\u0438\u0445-\u0442\u043e \u0438\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439: \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e, \u0442\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u0449\u0435\u043b\u0447\u043a\u0438 \u043f\u043e \u043d\u043e\u0441\u0443 \u043f\u043e \u043f\u0440\u0430\u0432\u0443 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u0440\u0443 \u0432 \u043d\u0430\u0433\u0440\u0430\u0434\u0443 \u0437\u0430 \u0435\u0433\u043e \u0431\u0435\u0441\u0441\u043e\u043d\u043d\u0443\u044e \u043d\u043e\u0447\u044c (\u043d\u043e \u043d\u0435 \u0437\u0430 &#171;\u043d\u043e\u0447\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443&#187;, \u043d\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435), \u0443\u0448\u0435\u0434\u0448\u0443\u044e \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 (\u0432 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438) \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e rails-app. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0432\u0435\u0440\u0435\u043d\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0435\u0435: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u0434\u0435\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u0433\u0438\u0442\u0445\u0430\u0431\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0430. \u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\">$ git clone https:\/\/github.com\/cmirnow\/slider-on-rails.git $ bundle install $ yarn install --check-files $ rails s<\/code><\/pre>\n<p>\u0414\u0430, \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0421\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441\u043c\u0435\u043d\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430 \u0441\u043b\u0430\u0439\u0434\u0430, \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f &#171;\u0441\u0432\u0435\u0442\u043b\u043e\/\u0442\u0435\u043c\u043d\u043e&#187; \u0432 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043e\u0442 0.0 \u0434\u043e 0.9, \u043f\u043b\u044e\u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0438\u043b\u0438 \u043d\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e) \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u043b\u043e\u0433\u0430\u043d, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0432 \u043b\u0435\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443, \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043b\u043e\u0433\u0430\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0433\u0430\u043d &#8212; \u043e\u0434\u043d\u0430 \u043b\u0438\u043d\u0438\u044f &#8212; \u043e\u0434\u0438\u043d \u0441\u043b\u0430\u0439\u0434, \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b94\/334\/1b1\/b943341b1353f85a189ccf4be01872e7.jpg\" alt=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" title=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" width=\"682\" height=\"753\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b94\/334\/1b1\/b943341b1353f85a189ccf4be01872e7.jpg\" data-blurred=\"true\"\/><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u044c\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0438\u043a\u043e\u043c, \u0442\u0430\u043a \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u043f\u0440\u0435\u0432\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u0438 \u043e\u043f\u0446\u0438\u044f\u043c\u0438; \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0434\u0432\u0443\u043c\u044f-\u0442\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u043a\u0430\u043c\u0438 \u043c\u044b\u0448\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0430\u0434\u043c\u0438\u043d\u043e\u0432, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f). \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0435\u0433\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u0436\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/adb\/1a3\/ace\/adb1a3aceaa788ff7eca26236d2c6984.jpg\" alt=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" title=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" width=\"682\" height=\"753\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/adb\/1a3\/ace\/adb1a3aceaa788ff7eca26236d2c6984.jpg\" data-blurred=\"true\"\/><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u0421\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 ActiveStorage: \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0442.\u0435., \u0438\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0443 \u0432\u0430\u0441 \u043d\u0430 \u041f\u041a) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Amazon S3 \u043b\u0438\u0431\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u043d\u043e\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043b\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u041a. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0449\u0443 \u0441\u0435\u0439\u0447\u0430\u0441, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u043a\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439 &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0432\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u041f\u041a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0421 \u044d\u0442\u0438\u043c &#8212; \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043a\u043e\u0432 \u0432 \u0421\u0435\u0442\u0438 \u0445\u043e\u0442\u044c \u043e\u0442\u0431\u0430\u0432\u043b\u044f\u0439, \u0431\u044b\u043b\u043e \u0431\u044b \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0410 \u041f\u041e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u043e\u043c\u043f\u0435, \u0442\u0430\u043a\u043e\u0432\u043e:<\/p>\n<pre><code class=\"bash\">$ ruby --version ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux] $ rails --version Rails 7.0.2.3 $ node --version v14.18.3 $ yarn --version 1.22.18 $ psql --version psql (PostgreSQL) 12.10<\/code><\/pre>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f ActiveAdmin \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 (\u044d\u0442\u043e \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e) \u0441\u0435\u0434\u044c\u043c\u044b\u0435 \u0440\u0435\u043b\u044c\u0441\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441 \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u043e\u0439 \u0438 \u0435\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c webpacker-\u043e\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e-\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c (\u0434\u0430\u0436\u0435 \u0436\u0430\u043b\u044c \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f, \u043a \u0441\u043b\u043e\u0432\u0443) \u043f\u0440\u0438\u0432\u044b\u043a\u0430\u0442\u044c. \u041b\u0438\u0445\u0430 \u0431\u0435\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u043e, \u043f\u043e\u0435\u0445\u0430\u043b\u0438:<\/p>\n<pre><code class=\"bash\">$ mkdir slider_onrails &amp;&amp; cd slider_onrails $ echo \"source 'https:\/\/rubygems.org'\" > Gemfile $ echo \"gem 'rails', '6.1.5'\" >> Gemfile $ bundle install<\/code><\/pre>\n<p>\u0422\u0430\u043a, \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f PostgreSQL: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0438\u043d\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0438\u043d\u0438-\u0441\u0435\u043c\u0438\u043d\u0430\u0440\u0430 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0437\u0430\u043b\u0438\u0442\u044c \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u043d\u0430 Heroku, \u0434\u0430\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u043e\u043b\u044e\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0431\u0435 \u0432\u0430\u0448\u0438\u043c \u043d\u043e\u0432\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c. &#171;\u0417\u0430\u043f\u0443\u0448\u0435\u043d\u043d\u043e\u0435&#187; \u043d\u0430 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <em>production<\/em>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043d\u0430 Amazon S3, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e; \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u043e\u0439 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440 \u041c\u0435\u0434\u0443\u0437\u0430 (\u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u0431\u043b\u0430\u0431\u043b\u0430\u0431\u043b\u0430 \u0438 \u0432\u0441\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0447\u0435\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u044f\u0437\u044b\u043a, \u0430\u0433\u0435\u043d\u0442\u043e\u043c), \u044d\u0442\u043e \u0442\u0435 \u0436 \u0441\u0430\u043c\u044b\u0435 \u0440\u0435\u043b\u044c\u0441\u044b, \u043a\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435; \u043f\u0440\u0430\u0432\u0434\u0430, \u043d\u0430 \u041c\u0435\u0434\u0443\u0437\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0438 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u043e \u043d\u0435 \u0441\u0443\u0442\u044c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u043b\u0430\u043d\u043e\u0432 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u0443\u0431\u0438\u0440\u0430\u0442\u044c <em>-d postgresql<\/em> \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (use sqlite3 as the database for Active Record):<\/p>\n<pre><code class=\"bash\">$ bundle exec rails new . --force -d postgresql $ bin\/rails db:create<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043e\u043f\u044f\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u044e \u043f\u0430\u0443\u0437\u0443, \u043f\u0435\u0440\u0435\u0431\u0438\u0432 \u0441\u0430\u043c \u0441\u0435\u0431\u044f \u0438 \u0441\u0445\u043e\u0434\u0443 \u0437\u0430\u0431\u0435\u0436\u0430\u0432 \u0432\u043f\u0435\u0440\u0435\u0434. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0432\u0435\u0441\u0435\u043b\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0438 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0438\u043c\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 Visa \/ MasterCard \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0410\u043c\u0430\u0437\u043e\u043d\u0430 &#8212; \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0442\u043a\u043e: \u0434\u043b\u044f \u0410\u043c\u0430\u0437\u043e\u043d\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f (\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0431\u043e\u0442\u044b) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 Gemfile <em>gem &#8216;aws-sdk-s3&#8217;<\/em> \u0438 \u0435\u0449\u0435 \u0440\u0430\u0437 <em>bundle install<\/em>, \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Heroku (Reveal Config Vars) \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447\/\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Amazon S3:<\/p>\n<pre><code class=\"bash\">AWS_ACCESS_KEY_ID '*********************' AWS_SECRET_ACCESS_KEY '****************************' REGION '****************************' BUCKET '****************************'<\/code><\/pre>\n<p>, \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0432:<\/p>\n<pre><code class=\"yaml\"># config\/storage.yml amazon:    service: S3    access_key_id: &lt;%= ENV['AWS_ACCESS_KEY_ID'] %>    secret_access_key: &lt;%= ENV['AWS_SECRET_ACCESS_KEY'] %>    region: &lt;%= ENV['REGION'] %>    bucket: &lt;%= ENV['BUCKET'] %><\/code><\/pre>\n<p>\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0432 <em>local<\/em> \u043d\u0430 <em>amazon<\/em>:<\/p>\n<pre><code class=\"ruby\"># config\/environments\/production.rb config.active_storage.service = :amazon<\/code><\/pre>\n<p>\u041d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e (\u043a\u043e\u043d\u0435\u0446 \u0440\u0435\u043c\u0430\u0440\u043a\u0438) \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f <em>rails new<\/em> \u0438 <em>db:create<\/em>, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ yarn add bootstrap@next @popperjs\/core<\/code><\/pre>\n<p>(\u0418\u043b\u0438 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 <em>bootstrap<\/em>, \u0431\u0435\u0437 &#8216;<em>@next&#8217;<\/em>. \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d <em>Bootstrap v.5.1.3<\/em>, \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e).<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/38c\/e29\/5d2\/38ce295d202285bb7fc941b9e08c05f5.jpg\" alt=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" title=\"\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &quot;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&quot;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap - \u0437\u0430 \u0447\u0430\u0441.\" width=\"682\" height=\"472\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/38c\/e29\/5d2\/38ce295d202285bb7fc941b9e08c05f5.jpg\" data-blurred=\"true\"\/><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c <em>application.html.erb<\/em> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"ruby\"># app\/views\/layouts\/application.html.erb &lt;%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %><\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"bash\">$ mkdir app\/javascript\/stylesheets &amp;&amp; touch app\/javascript\/stylesheets\/application.scss<\/code><\/pre>\n<p>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443:<\/p>\n<pre><code class=\"css\">@import \"bootstrap\";  \/* Carousel dark overlay *\/ .carousel-item:after {     content: \"\";     display: block;     position: absolute;     top: 0;     bottom: 0;     left: 0;     right: 0; }  \/* Slider caption style *\/ .carousel-caption {     left: 2%;     top: 5% !important;     transform: translateY(-50%);     text-align: left;     bottom: initial; }<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c <em>application.js<\/em>:<\/p>\n<pre><code class=\"javascript\"># app\/javascript\/packs\/application.js import Rails from \"@rails\/ujs\" import Turbolinks from \"turbolinks\" import * as ActiveStorage from \"@rails\/activestorage\" import \"channels\" import * as bootstrap from 'bootstrap' import \"..\/stylesheets\/application\"  Rails.start() Turbolinks.start() ActiveStorage.start()<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u0435\u0440\u0435\u0447\u043d\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043e\u043f\u0446\u0438\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430, \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u0432\u044c\u044e\u0445\u043e\u0439. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>scaffold<\/em>, \u043d\u043e \u044d\u0442\u043e \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0432\u0434\u043e\u0432\u0435\u0441\u043e\u043a \u043d\u0435\u043d\u0443\u0436\u043d\u0443\u044e \u043a\u0443\u0447\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0433\u0440\u0443\u0434\u0443 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0432\u0438\u0441\u0435\u0442\u044c \u043c\u0435\u0440\u0442\u0432\u044b\u043c \u0433\u0440\u0443\u0437\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">$ rails g model Slider name:string published_at:datetime interval:integer dark:float fade:boolean captions:text color:string $ rails g controller Slider index<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 Gemfile:<\/p>\n<pre><code class=\"bash\">gem 'image_processing', '~> 1.2' gem 'activeadmin' gem 'devise'<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435:<\/p>\n<pre><code class=\"bash\">$ bundle install $ rails g active_admin:install $ rails active_storage:install $ rails db:create $ rails db:migrate $ rails db:seed $ rails g active_admin:resource Slider<\/code><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"ruby\"># config\/routes.rb root \"slider#index\"<\/code><\/pre>\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c: \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u043c; \u0431\u0435\u0437 \u043d\u0435\u0435 &#8212; \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u043d\u043e\u0432\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u043e\u0440\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0441\u0442\u0430\u0440\u044b\u0445. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"ruby\"># config\/application.rb config.active_storage.replace_on_assign_to_many = false<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u043d\u043e\u0441\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0443\u0440\u0443 \u0432 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"ruby\"># app\/admin\/sliders.rb ActiveAdmin.register Slider do   permit_params :published_at, :name, :captions, :color, :interval, :dark, :fade, images: []   remove_filter :images_attachments, :images_blobs, :captions, :color, :interval, :dark, :fade    scope :all   scope :published   scope :unpublished    exclude_columns = [:captions]   index do     selectable_column     Slider.attribute_names.each do |clmn|       column clmn unless exclude_columns.include? clmn.to_sym     end     actions   end    action_item :publish, only: :show do     link_to 'Publish', publish_admin_slider_path(slider), method: :put unless slider.published_at?   end    action_item :unpublish, only: :show do     link_to 'Unpublish', unpublish_admin_slider_path(slider), method: :put if slider.published_at?   end    action_item :delete_images, only: :show do     link_to 'Delete Images', delete_images_admin_slider_path(slider), method: :delete if slider.images.attached?   end    member_action :publish, method: :put do     slider = Slider.find(params[:id])     slider.update(published_at: Time.zone.now)     redirect_to admin_slider_path(slider)   end    member_action :unpublish, method: :put do     slider = Slider.find(params[:id])     slider.update(published_at: nil)     redirect_to admin_slider_path(slider)   end    member_action :delete_images, method: :delete do     slider = Slider.find(params[:id])     # asset = ActiveStorage::Attachment.find_by(params[:attachment_id])     slider.images.purge_later     redirect_to admin_slider_path(slider)   end    member_action :delete_image, method: :delete do     slider = Slider.find_by(params[:name])     slider.images[params[:id].to_i].purge_later     redirect_to admin_slider_path(slider)   end    form do |f|     f.inputs 'Slider' do       f.input :fade, as: :boolean, label: 'carousel-fade'       f.input :name       f.input :captions, label: 'Captions. One image - one slogan - one line. The string is separated by \"\\r\\n\"'       f.input :color, label: 'Captions color'       f.input :interval, input_html: { value: f.object.interval || 5000 }       f.input :dark, input_html: { value: f.object.dark || 0.2 }       f.input :images, as: :file, input_html: { multiple: true }     end     f.actions   end   show do |t|     attributes_table do       if t.images.attached?         t.images.each_with_index do |img, index|           span do             link_to delete_image_admin_slider_path(index), method: :delete do               image_tag img.variant(resize_to_limit: [100, 100])             end           end         end       end       row :name       row :created_at       row :updated_at       row :published_at       row :fade     end     para 'Click the preview to delete the image.'   end end <\/code><\/pre>\n<pre><code class=\"ruby\"># app\/controllers\/slider_controller.rb class SliderController &lt; ApplicationController   def index     @slider = Slider.published.take   end end<\/code><\/pre>\n<pre><code class=\"ruby\"># app\/models\/slider.rb class Slider &lt; ApplicationRecord   has_many_attached :images, dependent: :purge_later   scope :published, -> { where.not(published_at: nil) }   scope :unpublished, -> { where(published_at: nil) } end<\/code><\/pre>\n<pre><code class=\"ruby\"># app\/helpers\/slider_helper.rb module SliderHelper   def slider_present?     @slider&amp;.images&amp;.attached?   end    def slider_dark     @slider.dark   end    def slider_interval     @slider&amp;.interval || 5000   end    def carousel_fade?     'carousel-fade' if @slider.fade == true   end    def captions     @slider&amp;.captions&amp;.split(\"\\r\\n\")   end    def caption_color     @slider.color   end end<\/code><\/pre>\n<pre><code class=\"xml\"># app\/views\/slider\/index.html.erb &lt;div class=\"container pt-5\"> &lt;% if slider_present? %> &lt;style> .carousel-item:after {     background: rgba(0, 0, 0, &lt;%= slider_dark %>); } .carousel-caption h3 {     color: &lt;%= caption_color %>; } &lt;\/style> &lt;div id=\"SliderOnRails\" class=\"carousel slide &lt;%= carousel_fade? %>\" data-bs-ride=\"carousel\" data-bs-interval=\"&lt;%= slider_interval %>\"> &lt;div class=\"carousel-inner\"> &lt;% @slider.images.each_with_index do |img, index| %> &lt;div class=\"carousel-item&lt;%= ' active' if index == 0 %>\"> &lt;%= image_tag(img, class:\"d-block w-100\") %> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;H3>&lt;%= captions[index] %>&lt;\/H3> &lt;\/div> &lt;\/div> &lt;% end %> &lt;\/div> &lt;button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#SliderOnRails\" data-bs-slide=\"prev\"> &lt;span class=\"carousel-control-prev-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Previous&lt;\/span> &lt;\/button> &lt;button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#SliderOnRails\" data-bs-slide=\"next\"> &lt;span class=\"carousel-control-next-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Next&lt;\/span> &lt;\/button> &lt;\/div> &lt;% else %> &lt;div class=\"alert alert-warning\" role=\"alert\"> No slides to display. &lt;\/div> &lt;% end %> &lt;\/div><\/code><\/pre>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u044d\u0442\u043e \u0432\u0441\u0435. \u0413\u043e\u0442\u043e\u0432\u043e:<\/p>\n<pre><code class=\"bash\">$ rails webpacker:compile $ rails s<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <a href=\"http:\/\/localhost:3000\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:3000<\/a> .<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432\u044c\u044e\u0445\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443 \u043c\u0435\u043d\u044f \u043f\u0430\u0440\u0443 \u0441\u0442\u0438\u043b\u0435\u0439, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438, \u0447\u0442\u043e \u0434\u043b\u044f Rails \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e &#171;\u043d\u0435 \u043f\u043e \u0444\u044d\u043d\u0448\u0443\u044e&#187;; \u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 Rails Asset Pipeline \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u0431\u043e \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 (\u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435), \u0438\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f (production mode).<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"http:\/\/localhost:3000\/admin\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:3000\/admin<\/a> \u0438 \u043b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f:<\/p>\n<p><code>User: admin@example.com<br \/> Password: password<\/code><\/p>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/p>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0432\u0435\u0440\u043d\u0443\u0441\u044c \u043a \u0434\u0435\u043f\u043b\u043e\u044e \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430 Heroku: \u0432\u0441\u0435 \u0442\u0430\u043a \u0436\u0435 \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u0440\u044f\u0434 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435\u043c\u0443\u0434\u0440\u0435\u043d\u043e \u0438\u0437\u0440\u044f\u0434\u043d\u043e \u043f\u043e\u043f\u043b\u0443\u0442\u0430\u0442\u044c \u0432 \u0442\u0440\u0435\u0445 \u0441\u043e\u0441\u043d\u0430\u0445&#8230; \u0438\u0442\u0430\u043a, \u0447\u0442\u043e \u0435\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430 Heroku, \u043f\u043e\u043c\u0438\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435:<\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c <em>db\/seeds.rb<\/em>, \u0443\u0431\u0438\u0440\u0430\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 <em>if Rails.env.development?<\/em> : \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Heroku \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d, \u0438 \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f activeadmin (\u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u043b\u0435\u0435).<\/p>\n<p>\u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f git \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b Heroku CLI, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/masterpro.ws\/forum\/ruby-ruby-on-rails\/4931-pamyatka-kak-opublikovat-rails-prilozhenie-na-heroku\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> (\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u0435\u0449\u0435 \u0433\u0434\u0435). \u0414\u0430\u043b\u0435\u0435:<\/p>\n<pre><code class=\"bash\">git add . git commit -m \"initial commit\" heroku create git push heroku master heroku run rake db:migrate heroku run rake db:seed<\/code><\/pre>\n<p>\u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430, \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u0440\u0430\u0437\u0443, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044f <em>seeds.rb<\/em>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u044e\u0431\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u0438:<\/p>\n<pre><code class=\"bash\">$ heroku run rails console<\/code><\/pre>\n<p>\u0425\u043e\u0442\u044f, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0443\u0434\u0430\u0447\u0438. \u041f\u0438\u0448\u0438\u0442\u0435, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e.  :))<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/659309\/\"> https:\/\/habr.com\/ru\/post\/659309\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u0442\u043e\u0442 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u0442 \u0432\u0430\u0441, \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c, \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Ruby on Rails 6 \u0438 Bootstrap 5; \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c,\u0447\u0442\u043e\u0431\u044b \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u044d\u0442\u043e\u0442 rails-app \u043e\u0431\u043b\u0430\u0434\u0430\u043b, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u044f\u0434\u043e\u043c \u043e\u043f\u0446\u0438\u0439, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ActiveAdmin. \u0414\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u043a\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c \u0438\u043b\u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u0447\u044c\u0438\u0445-\u0442\u043e \u0438\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439: \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u043e, \u0442\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u0449\u0435\u043b\u0447\u043a\u0438 \u043f\u043e \u043d\u043e\u0441\u0443 \u043f\u043e \u043f\u0440\u0430\u0432\u0443 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u0440\u0443 \u0432 \u043d\u0430\u0433\u0440\u0430\u0434\u0443 \u0437\u0430 \u0435\u0433\u043e \u0431\u0435\u0441\u0441\u043e\u043d\u043d\u0443\u044e \u043d\u043e\u0447\u044c (\u043d\u043e \u043d\u0435 \u0437\u0430 &#171;\u043d\u043e\u0447\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443&#187;, \u043d\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435), \u0443\u0448\u0435\u0434\u0448\u0443\u044e \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 (\u0432 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438) \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e rails-app. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0432\u0435\u0440\u0435\u043d\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0435\u0435: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u0434\u0435\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u0433\u0438\u0442\u0445\u0430\u0431\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0430. \u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\">$ git clone https:\/\/github.com\/cmirnow\/slider-on-rails.git $ bundle install $ yarn install --check-files $ rails s<\/code><\/pre>\n<p>\u0414\u0430, \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0421\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441\u043c\u0435\u043d\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430 \u0441\u043b\u0430\u0439\u0434\u0430, \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f &#171;\u0441\u0432\u0435\u0442\u043b\u043e\/\u0442\u0435\u043c\u043d\u043e&#187; \u0432 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043e\u0442 0.0 \u0434\u043e 0.9, \u043f\u043b\u044e\u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0438\u043b\u0438 \u043d\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e) \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u043b\u043e\u0433\u0430\u043d, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0432 \u043b\u0435\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443, \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043b\u043e\u0433\u0430\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0433\u0430\u043d &#8212; \u043e\u0434\u043d\u0430 \u043b\u0438\u043d\u0438\u044f &#8212; \u043e\u0434\u0438\u043d \u0441\u043b\u0430\u0439\u0434, \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"bordered full-width\"><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u044c\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0438\u043a\u043e\u043c, \u0442\u0430\u043a \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u043f\u0440\u0435\u0432\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u0438 \u043e\u043f\u0446\u0438\u044f\u043c\u0438; \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0434\u0432\u0443\u043c\u044f-\u0442\u0440\u0435\u043c\u044f \u043a\u043b\u0438\u043a\u0430\u043c\u0438 \u043c\u044b\u0448\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0430\u0434\u043c\u0438\u043d\u043e\u0432, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f). \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0435\u0433\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u0436\u0430\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443.<\/p>\n<figure class=\"full-width\"><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u0421\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 ActiveStorage: \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0442.\u0435., \u0438\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0443 \u0432\u0430\u0441 \u043d\u0430 \u041f\u041a) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Amazon S3 \u043b\u0438\u0431\u043e \u043b\u044e\u0431\u043e\u0435 \u0438\u043d\u043e\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043b\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u041a. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0449\u0443 \u0441\u0435\u0439\u0447\u0430\u0441, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u043a\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439 &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0432\u0430\u0448 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u041f\u041a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0421 \u044d\u0442\u0438\u043c &#8212; \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043a\u043e\u0432 \u0432 \u0421\u0435\u0442\u0438 \u0445\u043e\u0442\u044c \u043e\u0442\u0431\u0430\u0432\u043b\u044f\u0439, \u0431\u044b\u043b\u043e \u0431\u044b \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0410 \u041f\u041e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u043e\u043c\u043f\u0435, \u0442\u0430\u043a\u043e\u0432\u043e:<\/p>\n<pre><code class=\"bash\">$ ruby --version ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux] $ rails --version Rails 7.0.2.3 $ node --version v14.18.3 $ yarn --version 1.22.18 $ psql --version psql (PostgreSQL) 12.10<\/code><\/pre>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f ActiveAdmin \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 (\u044d\u0442\u043e \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e) \u0441\u0435\u0434\u044c\u043c\u044b\u0435 \u0440\u0435\u043b\u044c\u0441\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441 \u0448\u0435\u0441\u0442\u0435\u0440\u043a\u043e\u0439 \u0438 \u0435\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c webpacker-\u043e\u043c, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e-\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c (\u0434\u0430\u0436\u0435 \u0436\u0430\u043b\u044c \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f, \u043a \u0441\u043b\u043e\u0432\u0443) \u043f\u0440\u0438\u0432\u044b\u043a\u0430\u0442\u044c. \u041b\u0438\u0445\u0430 \u0431\u0435\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u043e, \u043f\u043e\u0435\u0445\u0430\u043b\u0438:<\/p>\n<pre><code class=\"bash\">$ mkdir slider_onrails &amp;&amp; cd slider_onrails $ echo \"source 'https:\/\/rubygems.org'\" > Gemfile $ echo \"gem 'rails', '6.1.5'\" >> Gemfile $ bundle install<\/code><\/pre>\n<p>\u0422\u0430\u043a, \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f PostgreSQL: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0438\u043d\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0438\u043d\u0438-\u0441\u0435\u043c\u0438\u043d\u0430\u0440\u0430 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0437\u0430\u043b\u0438\u0442\u044c \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u043d\u0430 Heroku, \u0434\u0430\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u043e\u043b\u044e\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0431\u0435 \u0432\u0430\u0448\u0438\u043c \u043d\u043e\u0432\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c. &#171;\u0417\u0430\u043f\u0443\u0448\u0435\u043d\u043d\u043e\u0435&#187; \u043d\u0430 Heroku \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <em>production<\/em>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043d\u0430 Amazon S3, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e; \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u043e\u0439 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440 \u041c\u0435\u0434\u0443\u0437\u0430 (\u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c, \u0431\u043b\u0430\u0431\u043b\u0430\u0431\u043b\u0430 \u0438 \u0432\u0441\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0447\u0435\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u044f\u0437\u044b\u043a, \u0430\u0433\u0435\u043d\u0442\u043e\u043c), \u044d\u0442\u043e \u0442\u0435 \u0436 \u0441\u0430\u043c\u044b\u0435 \u0440\u0435\u043b\u044c\u0441\u044b, \u043a\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435; \u043f\u0440\u0430\u0432\u0434\u0430, \u043d\u0430 \u041c\u0435\u0434\u0443\u0437\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0438 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u043e \u043d\u0435 \u0441\u0443\u0442\u044c. \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u043b\u0430\u043d\u043e\u0432 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u0443\u0431\u0438\u0440\u0430\u0442\u044c <em>-d postgresql<\/em> \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (use sqlite3 as the database for Active Record):<\/p>\n<pre><code class=\"bash\">$ bundle exec rails new . --force -d postgresql $ bin\/rails db:create<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u043e\u043f\u044f\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u044e \u043f\u0430\u0443\u0437\u0443, \u043f\u0435\u0440\u0435\u0431\u0438\u0432 \u0441\u0430\u043c \u0441\u0435\u0431\u044f \u0438 \u0441\u0445\u043e\u0434\u0443 \u0437\u0430\u0431\u0435\u0436\u0430\u0432 \u0432\u043f\u0435\u0440\u0435\u0434. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0432\u0435\u0441\u0435\u043b\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0438 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0438\u043c\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 Visa \/ MasterCard \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0410\u043c\u0430\u0437\u043e\u043d\u0430 &#8212; \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0442\u043a\u043e: \u0434\u043b\u044f \u0410\u043c\u0430\u0437\u043e\u043d\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f (\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0431\u043e\u0442\u044b) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 Gemfile <em>gem &#8216;aws-sdk-s3&#8217;<\/em> \u0438 \u0435\u0449\u0435 \u0440\u0430\u0437 <em>bundle install<\/em>, \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Heroku (Reveal Config Vars) \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447\/\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Amazon S3:<\/p>\n<pre><code class=\"bash\">AWS_ACCESS_KEY_ID '*********************' AWS_SECRET_ACCESS_KEY '****************************' REGION '****************************' BUCKET '****************************'<\/code><\/pre>\n<p>, \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0432:<\/p>\n<pre><code class=\"yaml\"># config\/storage.yml amazon:    service: S3    access_key_id: &lt;%= ENV['AWS_ACCESS_KEY_ID'] %>    secret_access_key: &lt;%= ENV['AWS_SECRET_ACCESS_KEY'] %>    region: &lt;%= ENV['REGION'] %>    bucket: &lt;%= ENV['BUCKET'] %><\/code><\/pre>\n<p>\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0432 <em>local<\/em> \u043d\u0430 <em>amazon<\/em>:<\/p>\n<pre><code class=\"ruby\"># config\/environments\/production.rb config.active_storage.service = :amazon<\/code><\/pre>\n<p>\u041d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e (\u043a\u043e\u043d\u0435\u0446 \u0440\u0435\u043c\u0430\u0440\u043a\u0438) \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f <em>rails new<\/em> \u0438 <em>db:create<\/em>, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ yarn add bootstrap@next @popperjs\/core<\/code><\/pre>\n<p>(\u0418\u043b\u0438 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 <em>bootstrap<\/em>, \u0431\u0435\u0437 &#8216;<em>@next&#8217;<\/em>. \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d <em>Bootstrap v.5.1.3<\/em>, \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e).<\/p>\n<figure class=\"bordered full-width\"><figcaption>\u0418\u0437 \u0446\u0438\u043a\u043b\u0430 &#171;\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0430\u043c&#187;. \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Rails \u0438 Bootstrap &#8212; \u0437\u0430 \u0447\u0430\u0441.<\/figcaption><\/figure>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c <em>application.html.erb<\/em> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"ruby\"># app\/views\/layouts\/application.html.erb &lt;%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %><\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"bash\">$ mkdir app\/javascript\/stylesheets &amp;&amp; touch app\/javascript\/stylesheets\/application.scss<\/code><\/pre>\n<p>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443:<\/p>\n<pre><code class=\"css\">@import \"bootstrap\";  \/* Carousel dark overlay *\/ .carousel-item:after {     content: \"\";     display: block;     position: absolute;     top: 0;     bottom: 0;     left: 0;     right: 0; }  \/* Slider caption style *\/ .carousel-caption {     left: 2%;     top: 5% !important;     transform: translateY(-50%);     text-align: left;     bottom: initial; }<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c <em>application.js<\/em>:<\/p>\n<pre><code class=\"javascript\"># app\/javascript\/packs\/application.js import Rails from \"@rails\/ujs\" import Turbolinks from \"turbolinks\" import * as ActiveStorage from \"@rails\/activestorage\" import \"channels\" import * as bootstrap from 'bootstrap' import \"..\/stylesheets\/application\"  Rails.start() Turbolinks.start() ActiveStorage.start()<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u0435\u0440\u0435\u0447\u043d\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043e\u043f\u0446\u0438\u0439 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430, \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u0432\u044c\u044e\u0445\u043e\u0439. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>scaffold<\/em>, \u043d\u043e \u044d\u0442\u043e \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0432\u0434\u043e\u0432\u0435\u0441\u043e\u043a \u043d\u0435\u043d\u0443\u0436\u043d\u0443\u044e \u043a\u0443\u0447\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0433\u0440\u0443\u0434\u0443 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0432\u0438\u0441\u0435\u0442\u044c \u043c\u0435\u0440\u0442\u0432\u044b\u043c \u0433\u0440\u0443\u0437\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">$ rails g model Slider name:string published_at:datetime interval:integer dark:float fade:boolean captions:text color:string $ rails g controller Slider index<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 Gemfile:<\/p>\n<pre><code class=\"bash\">gem 'image_processing', '~> 1.2' gem 'activeadmin' gem 'devise'<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435:<\/p>\n<pre><code class=\"bash\">$ bundle install $ rails g active_admin:install $ rails active_storage:install $ rails db:create $ rails db:migrate $ rails db:seed $ rails g active_admin:resource Slider<\/code><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"ruby\"># config\/routes.rb root \"slider#index\"<\/code><\/pre>\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c: \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0430 \u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u043c; \u0431\u0435\u0437 \u043d\u0435\u0435 &#8212; \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u043d\u043e\u0432\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u043e\u0440\u0446\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0441\u0442\u0430\u0440\u044b\u0445. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"ruby\"># config\/application.rb config.active_storage.replace_on_assign_to_many = false<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u043d\u043e\u0441\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0443\u0440\u0443 \u0432 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"ruby\"># app\/admin\/sliders.rb ActiveAdmin.register Slider do   permit_params :published_at, :name, :captions, :color, :interval, :dark, :fade, images: []   remove_filter :images_attachments, :images_blobs, :captions, :color, :interval, :dark, :fade    scope :all   scope :published   scope :unpublished    exclude_columns = [:captions]   index do     selectable_column     Slider.attribute_names.each do |clmn|       column clmn unless exclude_columns.include? clmn.to_sym     end     actions   end    action_item :publish, only: :show do     link_to 'Publish', publish_admin_slider_path(slider), method: :put unless slider.published_at?   end    action_item :unpublish, only: :show do     link_to 'Unpublish', unpublish_admin_slider_path(slider), method: :put if slider.published_at?   end    action_item :delete_images, only: :show do     link_to 'Delete Images', delete_images_admin_slider_path(slider), method: :delete if slider.images.attached?   end    member_action :publish, method: :put do     slider = Slider.find(params[:id])     slider.update(published_at: Time.zone.now)     redirect_to admin_slider_path(slider)   end    member_action :unpublish, method: :put do     slider = Slider.find(params[:id])     slider.update(published_at: nil)     redirect_to admin_slider_path(slider)   end    member_action :delete_images, method: :delete do     slider = Slider.find(params[:id])     # asset = ActiveStorage::Attachment.find_by(params[:attachment_id])     slider.images.purge_later     redirect_to admin_slider_path(slider)   end    member_action :delete_image, method: :delete do     slider = Slider.find_by(params[:name])     slider.images[params[:id].to_i].purge_later     redirect_to admin_slider_path(slider)   end    form do |f|     f.inputs 'Slider' do       f.input :fade, as: :boolean, label: 'carousel-fade'       f.input :name       f.input :captions, label: 'Captions. One image - one slogan - <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-331575","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/331575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331575"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/331575\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=331575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=331575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}