{"id":219175,"date":"2014-04-13T15:36:02","date_gmt":"2014-04-13T11:36:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=219175"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=219175","title":{"rendered":"<span class=\"post_title\">\u0412\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 Rails 4.1. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/b37\/479\/7d4\/b374797d4f42fb0731e23f2797a40a3a.jpg\" alt=\"image\"\/><br \/>  8 \u0430\u043f\u0440\u0435\u043b\u044f \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 Ruby on Rails <a href=\"http:\/\/weblog.rubyonrails.org\/2014\/4\/8\/Rails-4-1\/\">\u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c<\/a> \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0435 Rails 4.1. \u0412\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0441\u044f \u0432 5200 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>  \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b <a href=\"http:\/\/habrahabr.ru\/post\/207172\/\">\u043e\u0431\u0437\u043e\u0440<\/a> \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/edgeguides.rubyonrails.org\/4_1_release_notes.html\">Release notes<\/a> \u0438 <a href=\"http:\/\/edgeguides.rubyonrails.org\/upgrading_ruby_on_rails.html#upgrading-from-rails-4-0-to-rails-4-1\">A Guide for Upgrading Ruby on Rails<\/a>.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0438 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>Active Record Enums<\/h4>\n<p>  <\/p>\n<pre><code class=\"ruby\">class Conversation &lt; ActiveRecord::Base   enum status: [ :active, :archived ] end  # conversation.update! status: 0 conversation.active! conversation.active? # =&gt; true conversation.status  # =&gt; &quot;active&quot;  # conversation.update! status: 1 conversation.archived! conversation.archived? # =&gt; true conversation.status    # =&gt; &quot;archived&quot;  # conversation.update! status: 1 conversation.status = &quot;archived&quot;  # conversation.update! status: nil conversation.status = nil conversation.status.nil? # =&gt; true conversation.status      # =&gt; nil <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041e\u0447\u0435\u043d\u044c \u0432\u043a\u0443\u0441\u043d\u043e, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  1. \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0431\u0430\u0437\u0435, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438. (Enum values map to integers in the database, but can be queried by name).<br \/>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435:  <\/p>\n<pre><code class=\"ruby\">create_table :conversations do |t|   t.column :status, :integer end <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430:<br \/>  <code>where('status &lt;&gt; ? OR status &lt;&gt; ?', 0, 1)<\/code><br \/>  <code>where('status &lt;&gt; ? OR status &lt;&gt; ?', STATUS[:resolved], STATUS[:rejected])<\/code><br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 STATUS \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  2. \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <u>\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442<\/u> ENUM \u0442\u0438\u043f, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u2014 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0431\u0430\u0437\u0435. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0435 \u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c. \u041d\u0435\u043b\u044c\u0437\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043e \u044f\u0432\u043d\u043e.   <\/p>\n<pre><code class=\"ruby\">class Bug &lt; ActiveRecord::Base   enum status: {     new: 0,     #removed status with id=1     in_progress: 2,     resolved: 3,     rejected: 4,     reopened: 5   } end <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0445\u044d\u0448 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 <code>Bug.statuses<\/code><\/p>\n<p>  3. \u0415\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<br \/>  \u041d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f enum&#8217;\u043e\u0432 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 scopes, \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0439 (\u0447\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e) \u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0447\u0442\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"ruby\">class Bug &lt; ActiveRecord::Base   enum status: [ :new, :closed ]   enum code_review_status: [ :new, :finished ] # \u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f end <\/code><\/pre>\n<h4>\u041d\u043e\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Default scopes<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c default_scope \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 scopes, \u0435\u0441\u043b\u0438 \u044f\u0432\u043d\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435.  <\/p>\n<pre><code class=\"ruby\">class User &lt; ActiveRecord::Base   default_scope { where state: 'pending' }   scope :active, -&gt; { where state: 'active' }   scope :inactive, -&gt; { where state: 'inactive' } end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c <code>User.active<\/code> \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e <code>User.where(state: 'pending').where(state: 'active')<\/code>. \u0422.\u0435. \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 scopes \u0446\u0435\u043f\u043b\u044f\u044e\u0442\u0441\u044f(chains) \u043a default_scope.<br \/>  \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u00ab\u043e\u0442\u0446\u0435\u043f\u0438\u0442\u044c\u00bb scope \u043e\u0442 default_scope \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>unscope, except, rewhere<\/code>:  <\/p>\n<pre><code class=\"ruby\">class User &lt; ActiveRecord::Base   default_scope { where state: 'pending' }   scope :active, -&gt; { unscope(where: :state).where(state: 'active') }   scope :inactive, -&gt; { rewhere state: 'inactive' } end <\/code><\/pre>\n<h4>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f CSRF \u0437\u0430\u0449\u0438\u0442\u0430.<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e CSRF \u0437\u0430\u0449\u0438\u0442\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438 \u043d\u0430 get \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c .js.<br \/>  \u0414\u043b\u044f \u0447\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e.<br \/>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u0430\u043b\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e JS \u043a\u043e\u0434\u0430. \u0411\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. <br \/>  \u0412\u043c\u0435\u0441\u0442\u043e <br \/>  <code>post :create, format: :js<\/code><br \/>  \u041f\u0438\u0448\u0435\u043c <br \/>  <code>xhr :post, :create, format: :js<\/code><br \/>  \u0410 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0441\u0430\u0439\u0442\u0430\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c js \u043a\u043e\u0434, \u0442\u043e \u043d\u0430\u0434\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:  <\/p>\n<pre><code class=\"ruby\">skip_before_filter :verify_authenticity_token, only: [:stats, :visitor] <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c action \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430:  <\/p>\n<pre><code class=\"ruby\">response.headers['Access-Control-Allow-Origin'] = '*' <\/code><\/pre>\n<p>  \u041b\u0438\u0431\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f.<\/p>\n<hr\/>\n<p>  \u041f\u043e\u043a\u0430 \u044d\u0442\u043e \u0432\u0441\u0451, \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u043c\u0443. \u041a\u043e\u043d\u0447\u0435\u043d\u043e \u0436\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 Rails 4.1 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0448\u0438\u0440\u0435. \u041d\u043e \u0442\u0430\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u0441\u0435 \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0440\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0435.<br \/>  \u041d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 Major Features:  <\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u0435\u043b\u043e\u0430\u0434\u0435\u0440 Spring \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0444\u0430\u0439\u043b <code>config\/secrets.yml<\/code> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/li>\n<li>Action Pack Variants \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (tablet, desktop, phone, etc.)<\/li>\n<li>Action Mailer Previews \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f gem&#8217;\u0430 MailView \u0432 Rails \u2014 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043f\u0438\u0441\u0435\u043c.<\/li>\n<li>Message Verifiers \u2014 \u043e\u0431\u043c\u0435\u043d \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/li>\n<li>Module#concerning \u2014 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 (\u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0445\u043e\u0436\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c)<\/li>\n<\/ul>\n<p>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 MySQL 4.1 (\u044d\u0442\u043e \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043a\u0442\u043e-\u0442\u043e, \u043a\u0440\u043e\u043c\u0435 \u043c\u0435\u043d\u044f \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0440\u0438\u0442\u0435\u0442\u043e\u043c). \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/219175\/\"> http:\/\/habrahabr.ru\/post\/219175\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/b37\/479\/7d4\/b374797d4f42fb0731e23f2797a40a3a.jpg\" alt=\"image\"\/><br \/>  8 \u0430\u043f\u0440\u0435\u043b\u044f \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 Ruby on Rails <a href=\"http:\/\/weblog.rubyonrails.org\/2014\/4\/8\/Rails-4-1\/\">\u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c<\/a> \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0435 Rails 4.1. \u0412\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0441\u044f \u0432 5200 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>  \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b <a href=\"http:\/\/habrahabr.ru\/post\/207172\/\">\u043e\u0431\u0437\u043e\u0440<\/a> \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/edgeguides.rubyonrails.org\/4_1_release_notes.html\">Release notes<\/a> \u0438 <a href=\"http:\/\/edgeguides.rubyonrails.org\/upgrading_ruby_on_rails.html#upgrading-from-rails-4-0-to-rails-4-1\">A Guide for Upgrading Ruby on Rails<\/a>.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0438 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.  <\/p>\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-219175","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/219175","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=219175"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/219175\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}