<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Ruby brothers - &#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080; Comments</title>
  <id>tag:rubybrothers.ru,2009:/2007/10/5/using-form_for-with-multiply-models/comments</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
  <updated>2008-04-23T15:19:45Z</updated>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>&#1048;&#1083;&#1100;&#1103; &#1057;&#1072;&#1073;&#1072;&#1085;&#1080;&#1085;</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:436</id>
    <published>2008-04-23T15:19:45Z</published>
    <updated>2008-04-23T15:19:45Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by &#1048;&#1083;&#1100;&#1103; &#1057;&#1072;&#1073;&#1072;&#1085;&#1080;&#1085;</title>
<content type="html">&lt;p&gt;Метод &lt;var&gt;error_messages_for&lt;/var&gt; может принимать несколько символов моделей, для&#160;которых нужно вывести ошибки:&lt;/p&gt;


&lt;code class=&quot;ruby&quot;&gt;&lt;pre&gt;
error_messages_for :user, :credit_card
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;А&#160;вот в&#160;ответ на&#160;второй ваш&#160;вопрос я, наверное, напишу отдельную заметку, потому что&#160;решение не&#160;такое тривиальное.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Igor</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:435</id>
    <published>2008-04-23T14:47:24Z</published>
    <updated>2008-04-23T14:47:24Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Igor</title>
<content type="html">&lt;p&gt;Еще&#160;вопрос. Как&#160;быть&#8230; Я&#160;использую два&#160;объекта в&#160;одной форме как&#160;в&#160;статье, первая проблема с&#160;ошибками, а&#160;вторая с&#160;if @user.save &#38;&#38; @address.save
Первый объект сохраняется после удачного прохождения валидации а&#160;второго еще&#160;нет. Как&#160;сделать, что&#160;бы&#160;могли сохранится два&#160;объекти или&#160;не&#160;сохранится вообще(при ошибке в&#160;одном из&#160;них).
Заранее благодарен.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Igor</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:434</id>
    <published>2008-04-22T14:41:08Z</published>
    <updated>2008-04-22T14:41:08Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Igor</title>
<content type="html">&lt;p&gt;А&#160;как подружить сообщения об&#160;ошибках для&#160;разных моделий друг с&#160;другом&lt;/p&gt;


	&lt;p&gt;&amp;lt;%= error_messages_for :credit_carde %&gt;
&amp;lt;%= error_messages_for :user %&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Alex</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:299</id>
    <published>2007-11-13T10:56:03Z</published>
    <updated>2007-11-13T10:56:03Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Alex</title>
<content type="html">&lt;p&gt;Спасибо пригодиться&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Sanches</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:298</id>
    <published>2007-11-08T14:22:21Z</published>
    <updated>2007-11-08T14:22:21Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Sanches</title>
<content type="html">&lt;p&gt;Информация не&#160;очень понятна, но&#160;все равнг пригодиться&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>&#1048;&#1083;&#1100;&#1103;</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:285</id>
    <published>2007-10-06T02:33:36Z</published>
    <updated>2007-10-06T02:33:36Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by &#1048;&#1083;&#1100;&#1103;</title>
<content type="html">&lt;p&gt;Srtock: да, смотри рейлскаст.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Strock</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:284</id>
    <published>2007-10-05T21:15:08Z</published>
    <updated>2007-10-05T21:15:08Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Strock</title>
<content type="html">&lt;p&gt;А&#160;тема связей между моделями раскрыта? Ну, дабы дополнительного кода в&#160;контроллере не&#160;было.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://rubybrothers.ru">
    <author>
      <name>Sergey</name>
    </author>
    <id>tag:rubybrothers.ru,2007-10-05:277:283</id>
    <published>2007-10-05T07:12:59Z</published>
    <updated>2007-10-05T07:12:59Z</updated>
    <category term="Ruby on Rails"/>
    <category term="Tips &amp; Tricks"/>
    <category term="&#1053;&#1086;&#1074;&#1080;&#1095;&#1082;&#1091;"/>
    <link href="http://rubybrothers.ru/2007/10/5/using-form_for-with-multiply-models" rel="alternate" type="text/html"/>
    <title>Comment on '&#1048;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1084; form_for &#1089; &#1085;&#1077;&#1089;&#1082;&#1086;&#1083;&#1100;&#1082;&#1080;&#1084;&#1080; &#1084;&#1086;&#1076;&#1077;&#1083;&#1103;&#1084;&#1080;' by Sergey</title>
<content type="html">&lt;p&gt;собственно достаточно form_for @user&#160;do&lt;/p&gt;</content>  </entry>
</feed>

