Tag: public activity

如何使用私人提交来隐藏Feed?

在评估表单中,有一个提交按钮和一个按钮。 如果单击私人提交,则提交的信息将隐藏给查看该个人资料的其他用户。 我们如何使用来隐藏提交的信息以显示在Feed上? 活动/ index.html.erb Feed #We’d need to make .public_valuations work with this without getting an undefined method error. activities_controller.rb class ActivitiesController < ApplicationController def index @activities = PublicActivity::Activity.order("created_at desc").where(owner_id: current_user.following_ids, owner_type: "User") end end 为简洁起见,我只会包含_create (还有update和destroy )。 每次用户提交评估时,它都会在Feed上弹出,我们怎样才能显示public_valuations ? public_activity /评估/ _create.html.erb which has since been removed valuation.rb class Valuation (controller, model) { […]