Ruby on rails 4 Rails form_for locale无符号到整数的隐式转换
我陷入困境,试图为我的评论模型创建表单。我尝试通过区域设置获取post_id和user_id,将它们传递到表单,并为注释文本创建text_字段。在那之后,我得到了“没有将符号隐式转换为整数”的错误。 我的代码:Ruby on rails 4 Rails form_for locale无符号到整数的隐式转换,ruby-on-rails-4,form-for,Ruby On Rails 4,Form For,我陷入困境,试图为我的评论模型创建表单。我尝试通过区域设置获取post_id和user_id,将它们传递到表单,并为注释文本创建text_字段。在那之后,我得到了“没有将符号隐式转换为整数”的错误。 我的代码: 错误发生在途中。正确版本: <%= form_for @comment, url:user_post_comments(user_id: user_id, post_id: post_id) do |f| %> <%= form_for @comment, url
错误发生在途中。正确版本:
<%= form_for @comment, url:user_post_comments(user_id: user_id, post_id: post_id) do |f| %>
<%= form_for @comment, url:user_post_comments(user_id: user_id, post_id: post_id) do |f| %>