future-author-97799
07/17/2023, 9:18 AMcurved-father-82134
07/17/2023, 12:36 PMhttps://cdn.discordapp.com/attachments/740893011994738751/1130478033174794370/Screenshot_2023-07-17_at_5.29.37_PM.pngโพ
acceptable-cartoon-88076
07/17/2023, 4:42 PMacceptable-cartoon-88076
07/17/2023, 10:13 PMfuture-author-97799
07/18/2023, 10:46 AMhttps://cdn.discordapp.com/attachments/740893011994738751/1130812947439034459/Screenshot_2023-07-18_at_12.46.14.pngโพ
future-author-97799
07/18/2023, 2:45 PMself.visible = -> do
# You have access to:
# block
# context
# current_user
# params
# parent_model
# parent_resource
# resource
# view
# view_context
end
But` self.visible = -> { view == :show && parent_model.user.nil? } `
fails with `undefined local variable or method parent_model'
white-piano-9142
07/18/2023, 4:49 PMalert-toothbrush-24716
07/18/2023, 5:53 PMfuture-author-97799
07/19/2023, 12:50 PMwhite-piano-9142
07/19/2023, 1:15 PMfuture-author-97799
07/20/2023, 6:56 AMrails g avo:action AddAvailability
I am then registering the action in the resource (action AddAvailability
) and add a simple succeed 'ok'
after the models loop.
The action properly appears on top of the association block, but clicking on it has no effect.
The associated resources is displayed within some tabs.rapid-psychiatrist-19805
07/20/2023, 4:18 PMadorable-france-99527
07/20/2023, 8:44 PMhttps://cdn.discordapp.com/attachments/740893011994738751/1131688167720894494/Screen_Shot_2023-07-20_at_4.43.20_PM.pngโพ
most-gold-6444
07/21/2023, 1:41 PMhttps://cdn.discordapp.com/attachments/740893011994738751/1131944059804582031/empty_state.pngโพ
acceptable-cartoon-88076
07/21/2023, 1:54 PMnarrow-magazine-18722
07/21/2023, 3:34 PMfield :posts, as: :has_many, through: :comments
and I appear to be getting the same Post
record in the list multiple times if there are multiple comments, can I dedupe this somehow?adorable-france-99527
07/21/2023, 6:29 PMflat-painting-84798
07/23/2023, 1:00 PMrapid-psychiatrist-19805
07/24/2023, 3:16 PMbillowy-easter-81499
07/24/2023, 4:34 PMError performing Turbo::Streams::ActionBroadcastJob (Job ID: 194f3864-5724-4428-a444-90e7ead4d330) from Async(default) in 8.99ms: ActionView::Template::Error (undefined method `white_panel_classes' for #<ActionView::Base:0x000000000102e8>):
acceptable-cartoon-88076
07/24/2023, 7:49 PMwith_bare_content
for the main body?acceptable-cartoon-88076
07/25/2023, 4:47 PMfuture-author-97799
07/26/2023, 7:16 AMclass AssetsUploadAction < Avo::BaseAction
self.name = 'Upload Assets'
self.standalone = true
self.visible = -> { view == :index && !parent_resource.nil? }
self.message = 'Import several assets at once'
field :assets, as: :files
Any idea?
https://cdn.discordapp.com/attachments/740893011994738751/1133659139017551932/Screenshot_2023-07-26_at_09.15.56.pngโพ
curved-father-82134
07/26/2023, 12:18 PMhttps://cdn.discordapp.com/attachments/740893011994738751/1133735041529294948/Screenshot_2023-07-26_at_4.53.39_PM.pngโพ
adorable-france-99527
07/26/2023, 5:10 PMfuture-author-97799
07/27/2023, 6:01 AMfuture-author-97799
07/28/2023, 3:54 PMmammoth-notebook-46426
07/28/2023, 6:24 PMclass ConversationPolicy < ApplicationPolicy
def index?
user.admin?
end
def show?
user.admin?
end
end
ApplicationPolicy
class ApplicationPolicy
attr_reader :user, :record
def initialize(user, record)
@user = user
@record = record
end
def index?
false
end
def show?
false
end
def create?
false
end
def new?
create?
end
def update?
false
end
def edit?
update?
end
def destroy?
false
end
class Scope # rubocop:disable Style/Documentation
def initialize(user, scope)
@user = user
@scope = scope
end
def resolve
raise NotImplementedError, "You must define #resolve in #{self.class}"
end
private
attr_reader :user, :scope
end
end
What's odd is that when I go to the index for that resource, I can still see the edit and delete icons. This is true in our production environment. In our staging/qa environment, we ONLY see the view icon. So for some reason our staging/qa is following the policy defined, whereas our production environment it's ignoring the policy set up in ApplicationPolicy
. I guess I could try to define the `edit`/`update`/`destroy` policies in ConversationPolicy
outright...but you would think I shouldn't have to.
Any thoughts?lively-piano-10453
07/31/2023, 2:17 PMUncaught SyntaxError: Invalid or unexpected token (at avo.base.js:1:6418)
error and as shown in the screenshot, it complained on line 1 column 6418. but I'm not able to figure out what's causing this issue.
In the development environment this avo.base.js
is not minified and not causing this error, but in staging it's minified and maybe what's causing this?
Does anyone encounter this issue? and wondering if anyone has any pointers on how to resolve this issue?
Thanks.
https://cdn.discordapp.com/attachments/740893011994738751/1135576941785792643/image.pngโพ
https://cdn.discordapp.com/attachments/740893011994738751/1135576942054223942/image.pngโพ
adorable-france-99527
07/31/2023, 4:35 PM