Open HashtagONUD opened 4 years ago
Hm, I'm not sure how Rails handles two active_admin.js
files inside assets folder. If you already have active_admin.js
you can put this code inside it in a way (and please do not forget to remove active_admin.js.coffee
):
//= require activeadmin-async_panel
Looks like I need to update readme due to CoffeeScript is pretty outdated now.
Try this version it works with Rails 7 https://rubygems.org/gems/activeadmin-async_panel/versions/0.3.0
I'm running rails 6 and activeadmin (2.8.0) with activeadmin-async_panel (0.2.5). Trying to follow the installation instructions but having problems.
I didn't have an active_admin.js.coffee in my project, so I created one inside app/assets/javascripts alongside the active_admin.js file that was already there:
app/assets/javascripts/active_admin.js.coffee:
#= require activeadmin-async_panel
app/assets/javascripts/active_admin.js has one line in it:
//= require active_admin/base
app/assets/stylesheets/active_admin.scss is this:
In my AA page, I made a sample panel and member_action:
Finally, my template is at app/views/admin/animals/timecall.html.erb:
embedded ruby file, animal name is <%= count %>
When I load the page, the panel appears, but the data-url is not accessed:
Not sure what I'm doing wrong, as I followed the instructions in the README pretty closely.