<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Nekor (Nekor)</title>
    <link>https://ruby-china.org/Nekor</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>请教一个关于 rails 异步长轮询的问题。</title>
      <description>&lt;p&gt;我准备利用 ajax 从前台发送一个请求到 rails server，然后 rails 接受到这个请求之后一直进行处理，直到发现自己的数据发生改变后才向前台发送回应。但是如果一直在 action 处理的话，就会发生阻塞的问题，有没有办法不让服务器发生阻塞的方法？&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2019/a71c8cfd-26d2-4775-ad50-7c4089036c69.png!large" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Wed, 31 Jul 2019 11:17:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/38889</link>
      <guid>https://ruby-china.org/topics/38889</guid>
    </item>
    <item>
      <title>关于 RubyMine 2018.3.5 的问题，</title>
      <description>&lt;p&gt;今天刚从 2017.2 升级到 2018.3.5
发现启动时的 log 不见了（如图），有办法能把它调回来么？求解
&lt;img src="https://l.ruby-china.com/photo/2019/fd558c14-3662-4fd4-80cf-d95edbb3226f.png!large" title="" alt=""&gt;
上面的是 Debug 的时候出的。
使用 production 和 development 启动的时候没有上面那些信息。&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Wed, 13 Mar 2019 15:41:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/38228</link>
      <guid>https://ruby-china.org/topics/38228</guid>
    </item>
    <item>
      <title>有用 VS Code 调试 Rails 的大神么？？</title>
      <description>&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid&lt;span class="o"&gt;=&lt;/span&gt;830387
    &lt;span class="s2"&gt;"version"&lt;/span&gt;: &lt;span class="s2"&gt;"0.2.0"&lt;/span&gt;,
    &lt;span class="s2"&gt;"configurations"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
        &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"name"&lt;/span&gt;: &lt;span class="s2"&gt;"Rails server"&lt;/span&gt;,
            &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"Ruby"&lt;/span&gt;,
            &lt;span class="s2"&gt;"request"&lt;/span&gt;: &lt;span class="s2"&gt;"launch"&lt;/span&gt;,
            &lt;span class="s2"&gt;"program"&lt;/span&gt;: &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;workspaceRoot&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/bin/rails"&lt;/span&gt;,
            &lt;span class="s2"&gt;"args"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
                &lt;span class="s2"&gt;"server"&lt;/span&gt;
            &lt;span class="o"&gt;]&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我如果想改默认端口的话需要加些什么东西，研究俩小时了，也没弄明白该怎么做，也没有文档可以查。。&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Tue, 05 Mar 2019 17:24:44 +0800</pubDate>
      <link>https://ruby-china.org/topics/38197</link>
      <guid>https://ruby-china.org/topics/38197</guid>
    </item>
    <item>
      <title>关于 Redmine 的 Log 问题，请大神指点一下。</title>
      <description>&lt;p&gt;我想控制 production.log 文件里写进去的 log。
因为在 production.log 中发现了很多开发模式才需要的 log，造成冗余太多，我想把那些无用的 log 给控制住，应该怎么做？&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Mon, 29 Oct 2018 10:33:19 +0800</pubDate>
      <link>https://ruby-china.org/topics/37693</link>
      <guid>https://ruby-china.org/topics/37693</guid>
    </item>
    <item>
      <title>关于 form 表单的问题。</title>
      <description>&lt;p&gt;页面上有一个 tabel，tabel 里有多个 tr，每个 tr 前面会有一个 checkbox，有一个删除按钮，会删除选中的 checkbox 的那行通过表单提交的方式实现，现在我新加了一个功能，可以把各个行进行排序，通过 ajax 进行局部 tabel 的更新，ajax 提交成功后，我会把 tbody 里的东西全部清空，然后重新生成 tr 和 td。
重新生成的 html 代码与原来的 html 代码除了位置不同以外一模一样，但是这次表单提交以后 action 接受不到表单的值了，请问这是什么原因。&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Thu, 09 Aug 2018 17:30:05 +0800</pubDate>
      <link>https://ruby-china.org/topics/37307</link>
      <guid>https://ruby-china.org/topics/37307</guid>
    </item>
    <item>
      <title>一个 rails 问题，求大神解答。</title>
      <description>&lt;p&gt;redmine 里，我想在 APP 下的 Model 里调用 plugin 里的 helpers 中的一个方法，我需要怎样去调用？
求解答&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Wed, 25 Jul 2018 15:13:58 +0800</pubDate>
      <link>https://ruby-china.org/topics/37222</link>
      <guid>https://ruby-china.org/topics/37222</guid>
    </item>
    <item>
      <title>想请教大家一个问题。</title>
      <description>&lt;p&gt;是这样的，我想更新数据库中的数据。
假设有这样一个查询出来的对象&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="vi"&gt;@dbdata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tabel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:data_type&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="vi"&gt;@type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;还有一个 List&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;AA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;],[&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;],[&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;],[&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;],[&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;有没有办法可以批量更新。或者重新组织一下数据批量更新到 DB&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Wed, 18 Jul 2018 17:12:24 +0800</pubDate>
      <link>https://ruby-china.org/topics/37186</link>
      <guid>https://ruby-china.org/topics/37186</guid>
    </item>
    <item>
      <title>求助各位大神。</title>
      <description>&lt;p&gt;我现在想判断一个字符串是否为合法日期。
例如：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="s2"&gt;"2014-08-20"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;或&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="s2"&gt;"2014/08/20"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;使用正则表达式的话，是无法准确判断各个月份的天数，大月或者小月。&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Fri, 06 Jul 2018 13:06:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/37110</link>
      <guid>https://ruby-china.org/topics/37110</guid>
    </item>
    <item>
      <title>RedMine 里如何在 call_hook 的方法里跳转到新的 action？有办法么？</title>
      <description>&lt;p&gt;在一个继承了 Redmine::Hook::ViewListener 的 DemoHookLisener 的一个方法里，想要跳转到一个 action，如何跳转？
有哪位大神知道？&lt;/p&gt;

&lt;p&gt;我直接使用 redirect_to，被告知以下信息：
ActionView::Template::Error (undefined method `redirect_to' for #&lt;a rel="nofollow" target="_blank"&gt;DemoHookListener:0x4cb6450&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;我是想在 show 画面，在满足一定条件下自动跳到 detail 画面。由于在 show 画面里会先调用 view_hook 代码，对数据进行一些更新操作，所以一定得等这些更新做完后才能判断是否需要自动跳转到 detail 画面。
我调用代码：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DemoHookListener&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Redmine&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Hook&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;ViewListener&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;view_hook&lt;/span&gt;
    &lt;span class="n"&gt;略&lt;/span&gt;
    &lt;span class="n"&gt;redirect_to&lt;/span&gt; &lt;span class="ss"&gt;:controller&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"issues"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:action&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"detail"&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;show.html.erb&lt;/p&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;其他略
&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;call_hook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:view_hook&lt;/span&gt;&lt;span class="p"&gt;,{&lt;/span&gt;&lt;span class="n"&gt;参数略&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;detail.html.erb&lt;/p&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;略
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>Nekor</author>
      <pubDate>Thu, 05 Jul 2018 17:52:23 +0800</pubDate>
      <link>https://ruby-china.org/topics/37105</link>
      <guid>https://ruby-china.org/topics/37105</guid>
    </item>
    <item>
      <title>关于 redmine 的二次开发插件问题。</title>
      <description>&lt;p&gt;我想把我对原有 redmine 修改和增加的部分移植到 plugin 目录，现在遇到问题，如何把 setiing.yml 和 application.rb 文件也移植到 plugin 文件夹下。求助论坛上的大神！&lt;/p&gt;</description>
      <author>Nekor</author>
      <pubDate>Tue, 23 Jan 2018 17:22:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/34933</link>
      <guid>https://ruby-china.org/topics/34933</guid>
    </item>
  </channel>
</rss>
