platanus / activeadmin_addons Goto Github PK
View Code? Open in Web Editor NEWExtends ActiveAdmin to enable a set of great optional UX improving add-ons
License: MIT License
Extends ActiveAdmin to enable a set of great optional UX improving add-ons
License: MIT License
When using the addon, I get this error:
Asset was not declared to be precompiled in production.
Add `Rails.application.config.assets.precompile += %w( fileicons/file_extension_unknown.png )` to `config/initializers/assets.rb` and restart your server
Maybe you should handle that directly in your gem or add README instructions saying to precompile fileicons ?
Rails.application.config.assets.precompile += %w( fileicons/*.png )
Hi,
I have a dedicated model used to handle my paperclip attachments (Picture model with image attribute). How can I used your addons gem in ActiveAdmin index and show views to display the paperclip attachment of my model ?
Here is the code I tried:
index do
image_column { |r| r.picture.image } # How can I choose the size I want ?
actions
end
show do
attributes_table do
image_row resource.picture.image, style: :thumb # this doesn't work
end
end
Thanks for your help and this great gem !
What do you think should be the behavior for this @ldlsegovia . I have a method that might be nil
. Should we just show empty instead of raising an exception for using list_row without an Array
or a Hash
?
Rails throw this warning with Enumerize addon:
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead.
From module, you can access the original method using super
My application has a lot of selects and inputs. I would like to add this library to my project and apply the select to ONLY two select box.
The problem here is that I don't want to add default-select to each of them. Is there a way to avoid this specifying the selects I want to use?
Is there a way to avoid asking the user of this gem to manually edit active_admin.css.scss
and active_admin.js.coffee
? could we use something like this?
(Versions: Ruby: 2.2.3, Rails: 4.2.4, Active Admin: master, activeadmin_addons: master)
select2 v. 4.0 comes with some changes, one of them being the removal of initSelection
.
Bundle select2-rails
gem yourself with a pre-4 version:
gem 'select2-rails', '~> 3.5.9'
gem 'activeadmin_addons'
Specify a select2-rails
version in the gemspec
file:
s.add_dependency "select2-rails", "~> 3.5.9"
I was planning to make a pull request with this fix but I thought you might want to update the JS code to use select2 v4 instead.
This is an interesting gem, and adds a lot if nice features to AA, but unfortunately for me, I need to be able to specify a scope for :search_select so that I only see records that match a specific state.
Select inputs stays as normal select instead of changing to Select2 when you have an has_many relationship and you click the "Add new Model" button to add a group of fields.
There's a lot of fields here https://select2.github.io/examples.html#data-ajax that I'd like to use. In particular "data".
Unfortunately, activeadmin_addons makes assumptions with "url" (https://github.com/platanus/activeadmin_addons/blob/master/docs/select2_search.md#filter-usage), and I can't use my endpoint because it's just plain ol' q=
and I can't modify the request URL.
I'd like to discuss maybe adding a "classic: true" option or something like that so others can use the standard/classic API from select2 to override things.
As you build awesome enhancement for ActiveAdmin, did you plan to develop one to handle the Globalize gem to resources form ?
The only gem doing that is not maintained anymore and might no be working properly with Rails 5
That would be amazing to include it in your addons !
I loved this gem because it is user friendly and I have used select2 without AJAX and it works nicely without any problems, i can select any result.
Then I try to use select2 with ajax Search and it works for the autocomplete with this code
f.input :album_id, as: :search_select, url: admin_albums_path, fields: [:title], display_name: 'title', minimum_input_length: 2, order_by: 'title_asc'
but unfortunately, i cannot click/select the results shown in autocomplete, is it because of my activeadmin version @emilioeduardob ?
I use Ruby 2.3.1 , Rails 4.2.5.2 , mongoid 5.2.0, and this active admin gems:
Using activeadmin 1.0.0.pre5 from git://github.com/activeadmin/activeadmin.git (at master@7c664ec)
Using activeadmin_addons 0.10.1
Using activeadmin-mongoid 0.2.1 from git://github.com/elia/activeadmin-mongoid.git (at rails4-mongoid5@3ff2ade)
It could be a good idea to add a css class to bool_row and bool_column representing the value of the boolean. This could permit to customize the color or the size of the icon.
For example:
<td class="col bool_icon bool_true">✔</td>
<td class="col bool_icon bool_false">✗</td>
.bool_icon {
font-size: 20px;
}
.bool_true {
color: green;
}
.bool_false {
color: red;
}
I would like to see date_time_picker in my date range filters (such as created_at attribute). Is there a way of doing this?
Uncaught TypeError: Cannot read property 'toUpperCase' of undefined - after ajax search
When I select any item from the results in select2_search (AJAX one), I can't find the (x) button to clear my selection. This is happening only the AJAX one not the normal one.
Using Enumerize 2.0.0 sets off an infinite recursion war between ActiveAdmin Addons and Enumerize's efforts to modify Formastic. I believe this is occurring whenever a Filter is constructed, regardless of whether the relevant model uses Enumerize, as all of the index pages in my ActiveAdmin are throwing this error, but the Dashboard is not.
For example, see this stack trace:
7:10:48 web.1 | Completed 500 Internal Server Error in 2174ms (ActiveRecord: 4.4ms)
17:10:48 web.1 |
17:10:48 web.1 | SystemStackError (stack level too deep):
17:10:48 web.1 | activerecord (4.2.7.1) lib/active_record/dynamic_matchers.rb:37:in `block in match'
17:10:48 web.1 | activerecord (4.2.7.1) lib/active_record/dynamic_matchers.rb:37:in `each'
17:10:48 web.1 | activerecord (4.2.7.1) lib/active_record/dynamic_matchers.rb:37:in `find'
17:10:48 web.1 | activerecord (4.2.7.1) lib/active_record/dynamic_matchers.rb:37:in `match'
17:10:48 web.1 | activerecord (4.2.7.1) lib/active_record/dynamic_matchers.rb:12:in `respond_to?'
17:10:48 web.1 | activeadmin_addons (0.9.3) lib/activeadmin_addons/support/enumerize_formtastic_support.rb:13:in `input_with_ransack'
17:10:48 web.1 | enumerize (2.0.0) lib/enumerize/hooks/formtastic.rb:18:in `input'
17:10:48 web.1 | activeadmin_addons (0.9.3) lib/activeadmin_addons/support/enumerize_formtastic_support.rb:19:in `input_with_ransack'
17:10:48 web.1 | enumerize (2.0.0) lib/enumerize/hooks/formtastic.rb:18:in `input'
17:10:48 web.1 | activeadmin_addons (0.9.3) lib/activeadmin_addons/support/enumerize_formtastic_support.rb:19:in `input_with_ransack'
17:10:48 web.1 | enumerize (2.0.0) lib/enumerize/hooks/formtastic.rb:18:in `input'
17:10:48 web.1 | activeadmin_addons (0.9.3) lib/activeadmin_addons/support/enumerize_formtastic_support.rb:19:in `input_with_ransack'
17:10:48 web.1 | enumerize (2.0.0) lib/enumerize/hooks/formtastic.rb:18:in `input'
17:10:48 web.1 | activeadmin_addons (0.9.3) lib/activeadmin_addons/support/enumerize_formtastic_support.rb:19:in `input_with_ransack'
17:10:48 web.1 | enumerize (2.0.0) lib/enumerize/hooks/formtastic.rb:18:in `input'
... and on...
This is Enumerize's Formtastic hook and the corresponding hook in ActiveAdmin Addons
Unfortunately I don't understand enough about Formtastic to know what's really going on here, but I'm happy to help debug further.
Hello!
Firstly I'd like to thank you for your plugin, it's fantastic!
I have a query relating to the select2_search AJAX functionality, I am unable to get it working.
Adding filter :Bank_id, as: :search_select, fields: [:bsb, :institution, :name, :address, :city, :state, :postcode], url: admin_banks_path
results in an undefined local variable or method
admin_banks_path' for #ActiveAdmin::ResourceDSL:0x007fda93358ed0` error...
My routes are as follows:
` Prefix Verb URI Pattern Controller#Action
admin_root GET /admin(.:format) admin/dashboard#index
import_admin_banks GET /admin/banks/import(.:format) admin/banks#import
do_import_admin_banks POST /admin/banks/do_import(.:format) admin/banks#do_import
batch_action_admin_banks POST /admin/banks/batch_action(.:format) admin/banks#batch_action
admin_banks GET /admin/banks(.:format) admin/banks#index
POST /admin/banks(.:format) admin/banks#create
new_admin_bank GET /admin/banks/new(.:format) admin/banks#new
edit_admin_bank GET /admin/banks/:id/edit(.:format) admin/banks#edit
admin_bank GET /admin/banks/:id(.:format) admin/banks#show
PATCH /admin/banks/:id(.:format) admin/banks#update
PUT /admin/banks/:id(.:format) admin/banks#update
history_admin_bank_account GET /admin/bank_accounts/:id/history(.:format) admin/bank_accounts#history
import_admin_bank_accounts GET /admin/bank_accounts/import(.:format) admin/bank_accounts#import
do_import_admin_bank_accounts POST /admin/bank_accounts/do_import(.:format) admin/bank_accounts#do_import
batch_action_admin_bank_accounts POST /admin/bank_accounts/batch_action(.:format) admin/bank_accounts#batch_action
admin_bank_accounts GET /admin/bank_accounts(.:format) admin/bank_accounts#index
POST /admin/bank_accounts(.:format) admin/bank_accounts#create
new_admin_bank_account GET /admin/bank_accounts/new(.:format) admin/bank_accounts#new
edit_admin_bank_account GET /admin/bank_accounts/:id/edit(.:format) admin/bank_accounts#edit
admin_bank_account GET /admin/bank_accounts/:id(.:format) admin/bank_accounts#show
PATCH /admin/bank_accounts/:id(.:format) admin/bank_accounts#update
PUT /admin/bank_accounts/:id(.:format) admin/bank_accounts#update
admin_dashboard GET /admin/dashboard(.:format) admin/dashboard#index
history_admin_patient GET /admin/patients/:id/history(.:format) admin/patients#history
import_admin_patients GET /admin/patients/import(.:format) admin/patients#import
do_import_admin_patients POST /admin/patients/do_import(.:format) admin/patients#do_import
batch_action_admin_patients POST /admin/patients/batch_action(.:format) admin/patients#batch_action
admin_patients GET /admin/patients(.:format) admin/patients#index
POST /admin/patients(.:format) admin/patients#create
new_admin_patient GET /admin/patients/new(.:format) admin/patients#new
edit_admin_patient GET /admin/patients/:id/edit(.:format) admin/patients#edit
admin_patient GET /admin/patients/:id(.:format) admin/patients#show
PATCH /admin/patients/:id(.:format) admin/patients#update
PUT /admin/patients/:id(.:format) admin/patients#update
history_admin_user GET /admin/users/:id/history(.:format) admin/users#history
import_admin_users GET /admin/users/import(.:format) admin/users#import
do_import_admin_users POST /admin/users/do_import(.:format) admin/users#do_import
batch_action_admin_users POST /admin/users/batch_action(.:format) admin/users#batch_action
admin_users GET /admin/users(.:format) admin/users#index
POST /admin/users(.:format) admin/users#create
new_admin_user GET /admin/users/new(.:format) admin/users#new
edit_admin_user GET /admin/users/:id/edit(.:format) admin/users#edit
admin_user GET /admin/users/:id(.:format) admin/users#show
PATCH /admin/users/:id(.:format) admin/users#update
PUT /admin/users/:id(.:format) admin/users#update
admin_comments GET /admin/comments(.:format) admin/comments#index
POST /admin/comments(.:format) admin/comments#create
admin_comment GET /admin/comments/:id(.:format) admin/comments#show
DELETE /admin/comments/:id(.:format) admin/comments#destroy
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) registrations#cancel
user_registration POST /users(.:format) registrations#create
new_user_registration GET /users/sign_up(.:format) registrations#new
edit_user_registration GET /users/edit(.:format) registrations#edit
PATCH /users(.:format) registrations#update
PUT /users(.:format) registrations#update
DELETE /users(.:format) registrations#destroy
user_confirmation POST /users/confirmation(.:format) devise/confirmations#create
new_user_confirmation GET /users/confirmation/new(.:format) devise/confirmations#new
GET /users/confirmation(.:format) devise/confirmations#show
blazer /bi Blazer::Engine
rails_admin /database RailsAdmin::Engine
accommodations GET /accommodations(.:format) accommodations#index
POST /accommodations(.:format) accommodations#create
new_accommodation GET /accommodations/new(.:format) accommodations#new
edit_accommodation GET /accommodations/:id/edit(.:format) accommodations#edit
accommodation GET /accommodations/:id(.:format) accommodations#show
PATCH /accommodations/:id(.:format) accommodations#update
PUT /accommodations/:id(.:format) accommodations#update
DELETE /accommodations/:id(.:format) accommodations#destroy
bank_accounts GET /bank_accounts(.:format) bank_accounts#index
POST /bank_accounts(.:format) bank_accounts#create
new_bank_account GET /bank_accounts/new(.:format) bank_accounts#new
edit_bank_account GET /bank_accounts/:id/edit(.:format) bank_accounts#edit
bank_account GET /bank_accounts/:id(.:format) bank_accounts#show
PATCH /bank_accounts/:id(.:format) bank_accounts#update
PUT /bank_accounts/:id(.:format) bank_accounts#update
DELETE /bank_accounts/:id(.:format) bank_accounts#destroy
escorts GET /escorts(.:format) escorts#index
POST /escorts(.:format) escorts#create
new_escort GET /escorts/new(.:format) escorts#new
edit_escort GET /escorts/:id/edit(.:format) escorts#edit
escort GET /escorts/:id(.:format) escorts#show
PATCH /escorts/:id(.:format) escorts#update
PUT /escorts/:id(.:format) escorts#update
DELETE /escorts/:id(.:format) escorts#destroy
patients GET /patients(.:format) patients#index
POST /patients(.:format) patients#create
new_patient GET /patients/new(.:format) patients#new
edit_patient GET /patients/:id/edit(.:format) patients#edit
patient GET /patients/:id(.:format) patients#show
PATCH /patients/:id(.:format) patients#update
PUT /patients/:id(.:format) patients#update
DELETE /patients/:id(.:format) patients#destroy
receipts GET /receipts(.:format) receipts#index
POST /receipts(.:format) receipts#create
new_receipt GET /receipts/new(.:format) receipts#new
edit_receipt GET /receipts/:id/edit(.:format) receipts#edit
receipt GET /receipts/:id(.:format) receipts#show
PATCH /receipts/:id(.:format) receipts#update
PUT /receipts/:id(.:format) receipts#update
DELETE /receipts/:id(.:format) receipts#destroy
representatives GET /representatives(.:format) representatives#index
POST /representatives(.:format) representatives#create
new_representative GET /representatives/new(.:format) representatives#new
edit_representative GET /representatives/:id/edit(.:format) representatives#edit
representative GET /representatives/:id(.:format) representatives#show
PATCH /representatives/:id(.:format) representatives#update
PUT /representatives/:id(.:format) representatives#update
DELETE /representatives/:id(.:format) representatives#destroy
travel_diaries GET /travel_diaries(.:format) travel_diaries#index
POST /travel_diaries(.:format) travel_diaries#create
new_travel_diary GET /travel_diaries/new(.:format) travel_diaries#new
edit_travel_diary GET /travel_diaries/:id/edit(.:format) travel_diaries#edit
travel_diary GET /travel_diaries/:id(.:format) travel_diaries#show
PATCH /travel_diaries/:id(.:format) travel_diaries#update
PUT /travel_diaries/:id(.:format) travel_diaries#update
DELETE /travel_diaries/:id(.:format) travel_diaries#destroy
journeys GET /journeys(.:format) journeys#index
POST /journeys(.:format) journeys#create
new_journey GET /journeys/new(.:format) journeys#new
edit_journey GET /journeys/:id/edit(.:format) journeys#edit
journey GET /journeys/:id(.:format) journeys#show
PATCH /journeys/:id(.:format) journeys#update
PUT /journeys/:id(.:format) journeys#update
DELETE /journeys/:id(.:format) journeys#destroy
accommodations_get_business GET /accommodations/get_business(.:format) accommodations#get_business
GET /pages/:page(.:format) pages#show
root GET / pages#show {:page=>"home"}
GET / pages#show
Routes for Blazer::Engine:
run_queries POST /queries/run(.:format) blazer/queries#run
cancel_queries POST /queries/cancel(.:format) blazer/queries#cancel
refresh_query POST /queries/:id/refresh(.:format) blazer/queries#refresh
tables_queries GET /queries/tables(.:format) blazer/queries#tables
schema_queries GET /queries/schema(.:format) blazer/queries#schema
queries GET /queries(.:format) blazer/queries#index
POST /queries(.:format) blazer/queries#create
new_query GET /queries/new(.:format) blazer/queries#new
edit_query GET /queries/:id/edit(.:format) blazer/queries#edit
query GET /queries/:id(.:format) blazer/queries#show
PATCH /queries/:id(.:format) blazer/queries#update
PUT /queries/:id(.:format) blazer/queries#update
DELETE /queries/:id(.:format) blazer/queries#destroy
run_check GET /checks/:id/run(.:format) blazer/checks#run
checks GET /checks(.:format) blazer/checks#index
POST /checks(.:format) blazer/checks#create
new_check GET /checks/new(.:format) blazer/checks#new
edit_check GET /checks/:id/edit(.:format) blazer/checks#edit
check PATCH /checks/:id(.:format) blazer/checks#update
PUT /checks/:id(.:format) blazer/checks#update
DELETE /checks/:id(.:format) blazer/checks#destroy
refresh_dashboard POST /dashboards/:id/refresh(.:format) blazer/dashboards#refresh
dashboards GET /dashboards(.:format) blazer/dashboards#index
POST /dashboards(.:format) blazer/dashboards#create
new_dashboard GET /dashboards/new(.:format) blazer/dashboards#new
edit_dashboard GET /dashboards/:id/edit(.:format) blazer/dashboards#edit
dashboard GET /dashboards/:id(.:format) blazer/dashboards#show
PATCH /dashboards/:id(.:format) blazer/dashboards#update
PUT /dashboards/:id(.:format) blazer/dashboards#update
DELETE /dashboards/:id(.:format) blazer/dashboards#destroy
root GET / blazer/queries#home
Routes for RailsAdmin::Engine:
dashboard GET / rails_admin/main#dashboard
bulk_delete POST|DELETE /:model_name/bulk_delete(.:format) rails_admin/main#bulk_delete
export GET|POST /:model_name/export(.:format) rails_admin/main#export
history_index GET|PUT /:model_name/history(.:format) rails_admin/main#history_index
index GET|POST /:model_name(.:format) rails_admin/main#index
new GET|POST /:model_name/new(.:format) rails_admin/main#new
import GET|POST /:model_name/import(.:format) rails_admin/main#import
bulk_action POST /:model_name/bulk_action(.:format) rails_admin/main#bulk_action
delete GET|DELETE /:model_name/:id/delete(.:format) rails_admin/main#delete
edit GET|PUT /:model_name/:id/edit(.:format) rails_admin/main#edit
history_show GET /:model_name/:id/history(.:format) rails_admin/main#history_show
show GET /:model_name/:id(.:format) rails_admin/main#show
show_in_app GET /:model_name/:id/show_in_app(.:format) rails_admin/main#show_in_app`
I think the bool_column
implementation should work with user-defined blocks too, like this:
bool_column :active do |user|
UserState.new(user).active?
end
Right now, it's only working by calling the :active
method on the object.
I get an exception when I try to pass a style
to image_row
like:
image_row :foto, style: :xhdpi
@ldlsegovia Create pull request #72. Merge please.
I followed the documentation and replaced
f.input :names, as: :select
with
f.input :names, as: :tags
. This didn't work as told in the documentation. Even the autocomplete stoped working once I replaced :select with :tags.
Can anybody please help me with this?
If you have a hash within a hash, it could format nested hashs using another list
I have 3 table: Category, Post, Voucher
Voucher belongs_to Post
Post belongs_to Category
Table Category
haven't id column, primary_key is code
How can i use nested_select
in this case?
In AdminVoucher:
f.input :post_id, as: :nested_select,
minimum_input_length: 0,
level_1: {
attribute: :category_code,
url: '/admin/categories'
},
level_2: {
fields: [:title],
display_name: :title,
attribute: :post_id
}
List all categories displayed. However, in select list, i can not chosen and click.
I am using Active Admin 1.0.0.pre4. Rails 4.2.6 and ruby 2.2.4. I included the gem 'activeadmin_addon' in my gemfile and ran bundle install. After that I ran 'rails g activeadmin_addons:install'. This is giving me thefollowing:
Could not find generator 'activeadmin_addons:install'. Maybe you meant 'active_admin:install', 'active_admin:assets' or 'active_admin:devise'
What is the proper way of displaying tags for "enum" columns (Rails 4.1+) using activeadmin 1.0.0(.pre1)? I've never looked into the syntax of previous activeadmin versions, but 1.0.0 syntax is:
index do
selectable_column
column :title
column :description
column :status
actions
end
Neither 'tag_row' nor 'tag_column' work, they lead to a NoMethodError with an undefined method in :ActiveAdmin::Views::IndexAsTable.
While it is possible to use a normal 'column', this won't display any tags (and is the default behavior, even without using activeadmin_addons).
In case activeadmin_addons is not fully compatible with the 1.0.0 series of activeadmin, I strongly suggest to add a note in the description of the addon indicating which parts work and which don't.
The following is working well for me:
f.input :form_factor_ids, label: "Form Factors", as: :search_select, url: administration_form_factors_path, fields: [:full_name], display_name: 'full_name', minimum_input_length: 2, order_by: 'full_name_asc'
However, when I reload the page as edit, the select field is empty. Is it possible to have the existing value selected?
I have this error when I use nested_select
f.input :city, as: :nested_select,
level_1: {
attribute: :country,
collection: ['Egypt', 'Qatar', 'Sudan']
},
level_2: {
attribute: :area,
collection: ['area1', 'area2', 'area3']
},
level_3: {
attribute: :city,
collection: ['cairo', 'etc']
}
I don't know it this is a relevant to put, but after running bundle install
the gem is installed, but the $ rails g activeadmin_addons:install
command, never got executed, saying that the rack tasks doesn't know this task.
so, I added the js, and css lines manually...
undefined method `list_row' for
Rendered vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-0a5a15b88bff/app/views/active_admin/resource/edit.html.arb (9955.5ms)
Completed 500 Internal Server Error in 10041ms (ActiveRecord: 15.1ms)
SystemStackError (stack level too deep):
I install gem activeadmin_addons
and run rails g activeadmin_addons:install
After then, i run rails s
, access to admin/my_model
(all action), and i got this error.
I using rails 5 api with activeadmin, follow this https://rrott.com/blog/ror/rails-5-api-with-activeadmin-integration.html
ActiveAdmin.register MyModel do
end
Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
# ActiveModel::Serializer implementation and Rails hooks
gem 'active_model_serializers', github: 'rails-api/active_model_serializers'
# For Admin Site
gem 'devise'
gem 'activeadmin', github: 'activeadmin'
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
# Object-based searching
gem 'ransack'
# Provides a simple and extremely flexible way to upload files
gem 'carrierwave'
gem 'mini_magick', '~> 4.3.6'
# Enumerated attributes with I18n and ActiveRecord/Mongoid support
gem 'enumerize'
# A library for generating fake data such as names, addresses, and phone numbers
gem 'ffaker'
gem 'unicorn'
gem 'rmagick'
gem 'fog-aws'
gem 'config', '~> 1.0.0'
# gem 'chosen-rails'
gem 'activeadmin_addons'
Can anyone help me? Please
Thanks for this addon collection! Is there any way I could use the Select2 tag input with a collection, while also allowing users to create new tags? If I add the collection
option I seem to lose the ability to create new tags.
The input is defined as follows:
f.input :tag_ids, as: :tags, collection: ActsAsTaggableOn::Tag.all
Hello,
I could setup ajax for filter
filter :user_id_in, as: :search_select, multiple: true, url: '/admin/users.json',
fields: ['contact_f_name', 'contact_l_name'], display_name: :full_name, minimum_input_length: 2
It filters and works, except select2 input has no selected value after.
I see a request to DB to select correct user for index page
{
"utf8": "✓",
"q": {
"user_id_in": "165"
},
"commit": "Filter",
"order": "id_desc",
"controller": "admin/device_tokens",
"action": "index"
}
SELECT COUNT(*) FROM device_tokens
WHERE device_tokens
.user_id
IN (165)
But input has no label with users's name
<input id="q_user_id_in" class="select2-ajax " data-fields="["contact_f_name","contact_l_name"]" data-url="/admin/users.json" data-display_name="full_name" data-minimum_input_length="2" type="text" value="165" name="q[user_id_in]" tabindex="-1" title="User id in*" style="display: none;">
Is it misconfiguration or a bug?
My final goal is to have select2 input that supports multiselect + paging (to reduce html's page weight). Is this possible btw?
Thanks.
@emilioeduardob @ldlsegovia what do you think if we add the travis config so the gem is deployed every time a tag is pushed???
Is it possible to change width for specific select2 inputs?
Hi,
I need to select dates far in the past and the original activeadmin datepicker (three select boxes for year, month and day) work great, how can I disable select2 for these fields?
Thanks
if i use an enumerize field on a form, it doesn't show options unless I pass as: :select
f.input :state, as: :select
It could be a good idea to add the MP3 file icon for Paperclip attachment addon, as it's one of the most used audio format.
It seems that the select2 ajax search is case sensitive. Is there some way to ignore case? Thanks!
I want to use date_time_picker in active_admin_form_for
in ActiveAdmin.register_page
but it shows the following error:
undefined method 'input_name' for nil:NilClass
If I have a method on a model like
def is_admin
true
end
bool_column :is_admin
Always returns empty
hey!
I was trying to use tag_column
feature for has_many association and I was not using enumerize gem.
#app/models/vote.rb
class Vote < ActiveRecord::Base
enum status: %i( unregistered registered canceled )
end
#app/admin/poll.rb
panel 'Access tokens' do
table_for poll.votes do
column :token
tag_column :status
end
end
and I was getting
uninitialized constant Enumerize
after adding gem 'enumerize'
to my gemfile everything works as should what I supposed to be bug
Model A, B, C
B belongs_to A
C belongs_to C
validates :B_id, presence: true
in model C
In ActiveAdmin C:
Step 1: select A_id = 1
Step 2: don't select B_id
Step 3: Click submit => Error validation
Step 4: select A_id = 2 or 3,4,5...
Now, A_id still = 1
Please update your documentation to reflect how to actually use this code. Within the setup section of your readme please change this line -
//= require activeadmin_addons/all
Should be
*= require activeadmin_addons/all
//= is for including JS files not CSS
And this line
#= require activeadmin_addons/all
Should be
//= require activeadmin_addons/all
Version 4 has been out since September 2015, it would be nice to be able to use the latest version
It is possible to have https://github.com/markevans/dragonfly integration other than paperclip?
I would happily try to code it myself and submit a PR but I may need some directions :)
i installed activeadmin_addons in my project but when i went to the admin page i got an error about missing ransack. Adding it to my Gemfile and installing it fixed it. It should be a dependency.
Hi,
When compiling the scss file of your plugin, I got this deprecation warning message:
[WARN ] DEPRECATION WARNING: Extra .css in SCSS file is unnecessary. Rename /.rvm/gems/ruby-2.2.2/gems/activeadmin_addons-0.2.8/app/assets/stylesheets/activeadmin_addons/all.css.scss to /.rvm/gems/ruby-2.2.2/gems/activeadmin_addons-0.2.8/app/assets/stylesheets/activeadmin_addons/all.scss.
Thanks !
Actually the gem works with responses like this:
[{"id":1,"name":"Chile"}, {"id":2,"name":"Argentina"}]
It would be desirable to work with the following response too:
{"countries":[{"id":1,"name":"Chile"}, {"id":2,"name":"Argentina"}]}
this is an issue with select2_search and select2_nested_select
it would be nice to infer the root. For example, having:
f.input :category_id, as: :search_select, url: admin_categories_path, fields: [:name], display_name: 'name', minimum_input_length: 1
if category_id
is the attribute, we should infer categories
root. If response.categories
is null, we should infer a rootless response.
what do you think about this @emilioeduardob ?
Rails 4.2.6
ActiveAdmin 1.0.0.pre2
invalid byte sequence in UTF-8
Occur when i set //= require activeadmin_addons/all
in my active_admin.scss
Full log:
ArgumentError - invalid byte sequence in UTF-8:
less-rails (2.7.1) lib/less/rails/import_processor.rb:23:in scan' less-rails (2.7.1) lib/less/rails/import_processor.rb:23:in
depend_on'
less-rails (2.7.1) lib/less/rails/import_processor.rb:27:in block in depend_on' less-rails (2.7.1) lib/less/rails/import_processor.rb:24:in
each'
less-rails (2.7.1) lib/less/rails/import_processor.rb:24:in depend_on' less-rails (2.7.1) lib/less/rails/import_processor.rb:18:in
evaluate'
tilt (2.0.4) lib/tilt/template.rb:102:in render' sprockets (3.6.0) lib/sprockets/legacy_tilt_processor.rb:25:in
call'
sprockets (3.6.0) lib/sprockets/processor_utils.rb:75:in call_processor' sprockets (3.6.0) lib/sprockets/processor_utils.rb:57:in
block in call_processors'
sprockets (3.6.0) lib/sprockets/processor_utils.rb:56:in reverse_each' sprockets (3.6.0) lib/sprockets/processor_utils.rb:56:in
call_processors'
sprockets (3.6.0) lib/sprockets/loader.rb:134:in load_from_unloaded' sprockets (3.6.0) lib/sprockets/loader.rb:60:in
block in load'
sprockets (3.6.0) lib/sprockets/loader.rb:317:in fetch_asset_from_dependency_cache' sprockets (3.6.0) lib/sprockets/loader.rb:44:in
load'
sprockets (3.6.0) lib/sprockets/cached_environment.rb:20:in block in initialize' sprockets (3.6.0) lib/sprockets/cached_environment.rb:47:in
load'
sprockets (3.6.0) lib/sprockets/bundle.rb:23:in block in call' sprockets (3.6.0) lib/sprockets/utils.rb:183:in
dfs'
sprockets (3.6.0) lib/sprockets/bundle.rb:24:in call' sprockets (3.6.0) lib/sprockets/processor_utils.rb:75:in
call_processor'
sprockets (3.6.0) lib/sprockets/processor_utils.rb:57:in block in call_processors' sprockets (3.6.0) lib/sprockets/processor_utils.rb:56:in
reverse_each'
sprockets (3.6.0) lib/sprockets/processor_utils.rb:56:in call_processors' sprockets (3.6.0) lib/sprockets/loader.rb:134:in
load_from_unloaded'
sprockets (3.6.0) lib/sprockets/loader.rb:60:in block in load' sprockets (3.6.0) lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache'
sprockets (3.6.0) lib/sprockets/loader.rb:44:in load' sprockets (3.6.0) lib/sprockets/cached_environment.rb:20:in
block in initialize'
sprockets (3.6.0) lib/sprockets/cached_environment.rb:47:in load' sprockets (3.6.0) lib/sprockets/base.rb:66:in
find_asset'
sprockets (3.6.0) lib/sprockets/base.rb:92:in []' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:341:in
find_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:333:in find_debug_asset' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:216:in
block in lookup_debug_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:229:in block in resolve_asset' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in
each'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in detect' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:228:in
resolve_asset'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:215:in lookup_debug_asset' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:157:in
block in stylesheet_link_tag'
sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:156:in map' sprockets-rails (3.0.4) lib/sprockets/rails/helper.rb:156:in
stylesheet_link_tag'
arbre (1.0.3) lib/arbre/element.rb:180:in method_missing' activeadmin (1.0.0.pre2) lib/active_admin/views/pages/base.rb:27:in
block (2 levels) in build_active_admin_head'
activeadmin (1.0.0.pre2) lib/active_admin/views/pages/base.rb:26:in each' activeadmin (1.0.0.pre2) lib/active_admin/views/pages/base.rb:26:in
block in build_active_admin_head'
arbre (1.0.3) lib/arbre/context.rb:92:in with_current_arbre_element' arbre (1.0.3) lib/arbre/element/builder_methods.rb:49:in
with_current_arbre_element'
activeadmin (1.0.0.pre2) lib/active_admin/views/pages/base.rb:24:in build_active_admin_head' activeadmin (1.0.0.pre2) lib/active_admin/views/pages/base.rb:9:in
build'
arbre (1.0.3) lib/arbre/element/builder_methods.rb:30:in block in build_tag' arbre (1.0.3) lib/arbre/context.rb:92:in
with_current_arbre_element'
arbre (1.0.3) lib/arbre/element/builder_methods.rb:26:in build_tag' arbre (1.0.3) lib/arbre/element/builder_methods.rb:39:in
insert_tag'
activeadmin (1.0.0.pre2) app/views/active_admin/resource/index.html.arb:2:in block in ___sers_mikhail__rbenv_versions_______lib_ruby_gems_______gems_activeadmin_______pre__app_views_active_admin_resource_index_html_arb___2768989945323213763_70279960401700' arbre (1.0.3) lib/arbre/context.rb:45:in
instance_eval'
arbre (1.0.3) lib/arbre/context.rb:45:in initialize' activeadmin (1.0.0.pre2) app/views/active_admin/resource/index.html.arb:1:in
new'
activeadmin (1.0.0.pre2) app/views/active_admin/resource/index.html.arb:1:in ___sers_mikhail__rbenv_versions_______lib_ruby_gems_______gems_activeadmin_______pre__app_views_active_admin_resource_index_html_arb___2768989945323213763_70279960401700' actionview (4.2.6) lib/action_view/template.rb:145:in
block in render'
activesupport (4.2.6) lib/active_support/notifications.rb:166:in instrument' actionview (4.2.6) lib/action_view/template.rb:333:in
instrument'
actionview (4.2.6) lib/action_view/template.rb:143:in render' actionview (4.2.6) lib/action_view/renderer/template_renderer.rb:54:in
block (2 levels) in render_template'
actionview (4.2.6) lib/action_view/renderer/abstract_renderer.rb:39:in block in instrument' activesupport (4.2.6) lib/active_support/notifications.rb:164:in
block in instrument'
activesupport (4.2.6) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.2.6) lib/active_support/notifications.rb:164:in
instrument'
actionview (4.2.6) lib/action_view/renderer/abstract_renderer.rb:39:in instrument' actionview (4.2.6) lib/action_view/renderer/template_renderer.rb:53:in
block in render_template'
actionview (4.2.6) lib/action_view/renderer/template_renderer.rb:61:in render_with_layout' actionview (4.2.6) lib/action_view/renderer/template_renderer.rb:52:in
render_template'
actionview (4.2.6) lib/action_view/renderer/template_renderer.rb:14:in render' actionview (4.2.6) lib/action_view/renderer/renderer.rb:46:in
render_template'
actionview (4.2.6) lib/action_view/renderer/renderer.rb:27:in render' actionview (4.2.6) lib/action_view/rendering.rb:100:in
_render_template'
actionpack (4.2.6) lib/action_controller/metal/streaming.rb:217:in _render_template' actionview (4.2.6) lib/action_view/rendering.rb:83:in
render_to_body'
actionpack (4.2.6) lib/action_controller/metal/rendering.rb:32:in render_to_body' actionpack (4.2.6) lib/action_controller/metal/renderers.rb:37:in
render_to_body'
actionpack (4.2.6) lib/abstract_controller/rendering.rb:25:in render' actionpack (4.2.6) lib/action_controller/metal/rendering.rb:16:in
render'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:44:in block (2 levels) in render' activesupport (4.2.6) lib/active_support/core_ext/benchmark.rb:12:in
block in ms'
/Users/mikhail/.rbenv/versions/2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in realtime' activesupport (4.2.6) lib/active_support/core_ext/benchmark.rb:12:in
ms'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:44:in block in render' actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:87:in
cleanup_view_runtime'
activerecord (4.2.6) lib/active_record/railties/controller_runtime.rb:25:in cleanup_view_runtime' actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:43:in
render'
wicked_pdf (1.0.6) lib/wicked_pdf/pdf_helper.rb:22:in render_with_wicked_pdf' responders (2.2.0) lib/action_controller/responder.rb:238:in
default_render'
responders (2.2.0) lib/action_controller/responder.rb:170:in to_html' responders (2.2.0) lib/responders/flash_responder.rb:107:in
to_html'
responders (2.2.0) lib/action_controller/responder.rb:163:in respond' responders (2.2.0) lib/action_controller/responder.rb:156:in
call'
responders (2.2.0) lib/action_controller/respond_with.rb:205:in respond_with' inherited_resources (1.6.0) lib/inherited_resources/actions.rb:7:in
index'
activeadmin (1.0.0.pre2) lib/active_admin/resource_controller/streaming.rb:12:in index' actionpack (4.2.6) lib/action_controller/metal/implicit_render.rb:4:in
send_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:198:in process_action' actionpack (4.2.6) lib/action_controller/metal/rendering.rb:10:in
process_action'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (4.2.6) lib/active_support/callbacks.rb:117:in
call'
activesupport (4.2.6) lib/active_support/callbacks.rb:555:in block (2 levels) in compile' activesupport (4.2.6) lib/active_support/callbacks.rb:505:in
call'
activesupport (4.2.6) lib/active_support/callbacks.rb:92:in __run_callbacks__' activesupport (4.2.6) lib/active_support/callbacks.rb:778:in
_run_process_action_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.6) lib/abstract_controller/callbacks.rb:19:in
process_action'
actionpack (4.2.6) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:32:in
block in process_action'
activesupport (4.2.6) lib/active_support/notifications.rb:164:inblock in instrument' activesupport (4.2.6) lib/active_support/notifications/instrumenter.rb:20:in
instrument'
activesupport (4.2.6) lib/active_support/notifications.rb:164:ininstrument' actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:30:in
process_action'
actionpack (4.2.6) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' activerecord (4.2.6) lib/active_record/railties/controller_runtime.rb:18:in
process_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:137:inprocess' actionview (4.2.6) lib/action_view/rendering.rb:30:in
process'
actionpack (4.2.6) lib/action_controller/metal.rb:196:indispatch' actionpack (4.2.6) lib/action_controller/metal/rack_delegation.rb:13:in
dispatch'
actionpack (4.2.6) lib/action_controller/metal.rb:237:inblock in action' actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:in
dispatch'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:43:inserve' actionpack (4.2.6) lib/action_dispatch/journey/router.rb:43:in
block in serve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:ineach' actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in
serve'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:817:incall' warden (1.2.6) lib/warden/manager.rb:35:in
block in call'
warden (1.2.6) lib/warden/manager.rb:34:incatch' warden (1.2.6) lib/warden/manager.rb:34:in
call'
rack (1.6.4) lib/rack/etag.rb:24:incall' rack (1.6.4) lib/rack/conditionalget.rb:25:in
call'
rack (1.6.4) lib/rack/head.rb:13:incall' actionpack (4.2.6) lib/action_dispatch/middleware/params_parser.rb:27:in
call'
actionpack (4.2.6) lib/action_dispatch/middleware/flash.rb:260:incall' rack (1.6.4) lib/rack/session/abstract/id.rb:225:in
context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:incall' actionpack (4.2.6) lib/action_dispatch/middleware/cookies.rb:560:in
call'
activerecord (4.2.6) lib/active_record/query_cache.rb:36:incall' activerecord (4.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in
call'
activerecord (4.2.6) lib/active_record/migration.rb:377:incall' actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:29:in
block in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:88:in**run_callbacks**' activesupport (4.2.6) lib/active_support/callbacks.rb:778:in
_run_call_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in
call'
actionpack (4.2.6) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.2.6) lib/action_dispatch/middleware/remote_ip.rb:78:in
call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:inprotected_app_call' better_errors (2.1.1) lib/better_errors/middleware.rb:79:in
better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:incall' actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
call'
actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.6) lib/rails/rack/logger.rb:38:in
call_app'
railties (4.2.6) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in
block in tagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in
tagged'
railties (4.2.6) lib/rails/rack/logger.rb:20:incall' quiet_assets (1.1.0) lib/quiet_assets.rb:27:in
call_with_quiet_assets'
actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:incall' rack (1.6.4) lib/rack/methodoverride.rb:22:in
call'
rack (1.6.4) lib/rack/runtime.rb:18:incall' activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in
call'
rack (1.6.4) lib/rack/lock.rb:17:incall' actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:in
call'
rack (1.6.4) lib/rack/sendfile.rb:113:incall' actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:in
call'
railties (4.2.6) lib/rails/engine.rb:518:incall' railties (4.2.6) lib/rails/application.rb:165:in
call'
rack (1.6.4) lib/rack/lock.rb:17:incall' rack (1.6.4) lib/rack/content_length.rb:15:in
call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in`service'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.