我知道这很难但是..。从上一篇文章的发布之日到time.now,我试图在特定的时间内计算time.now的视图,而下面的代码似乎在这条消息出现时不起作用?
错误的参数数(给定0,预期1..2)
<%= @user.impressionist_count(:filter=>:ip_address, :start_date=>"#{current_user.posts.last.created_at.strftime("%Y-%m-%d")}", :end_date=>"#{t.strftime("%Y-%m-%d")}") %>岗控员:
def show
@user = current.user
@post = Post.new
end用户模型:
is_impressionable
has_many posts发布于 2018-07-16 04:10:33
这应该能正常工作。
<%= @user.impressionist_count(:filter => :ip_address, :start_date =>
current_user.posts.last.created_at.strftime('%Y-%m-%d'), :end_date =>
t.strftime('%Y-%m-%d')) %>https://stackoverflow.com/questions/51353165
复制相似问题