Rails Active_Admin VS. my own backend - ruby-on-rails

I've been thinking of writing my own backend, because I feel active_admin might not support all the requirements.
I wanted to ask if Active_Admin supports any of these just to be sure:
I have a has_and_belongs_to_many relationship between my ad model
and tag model. In the new ad page I would like to have the form for
the ads, as well as all available tags so the admin can choose which
tags to associate with the ad. I was able to do that normally in my
application, but can I do that with active_admin?
Can I add custom buttons.. Like one to convert to PDF for example,
or one to send an e-mail..
Could I add some sort of before_filter, so the admin can only view a
model, but not edit or delete it for example?
Thank you.

All of those things can be done via Active Admin, but as it was pointed out, it can be quite a nightmare actually implementing certain things depending on the amount of flexibility you need it to have. For that exact reason, I decided to start rolling my own administration panels.

I have tried an implemented almost all robust gems for admin panels. I have also sweated over several hand-made ones.
Active-Admin is very usability centred, but it is not configuration centred.
As you rightly aniticipated, some of the more complex modifications can be tedious.
In my experience, rails_admin is the best middle ground I could find.
Take a look at it, it is highly functional, completely modular (made as a Rails 3 Engine) and simpler to modify.
If you can live without some details when customizing this is definitely the way to go. However, if you need to have everything just right, then there is not substitute for hand-made.

Related

RailsAdmin vs ActiveAdmin 2016

I need to get hard decision, and choose between this two CMS gems. It is absolutely incorrect to choose it, based on the frontend design.
After getting into both, I understood, that the difference nowadays is really thin. Help me and show this difference for proper choice.
I need it for little project ~15-20 models
PS: I'm asking not for holy war, I really need to know what to choose
Currently I am using ActiveAdmin,its functionality & customization is easy. But as in your project, if you will use 15-20 model, its header layout will be disturbed. So better to use Rails admin, because its view is much better and you can easily use 15-20 model.

Is active Admin a good fit for a complex admin interface for a daily deal rails 3.2 app?

I am building a daily deal app in Rails.
I just installed activeadmin gem which is really great and easy so that I can now create and monitor users. My need for creating and managing deals is quite complex:
I need to be able with the basic text fields (name of deal, date of deals, product name...) to add on the Deal's page stuff that for me (as a Rails newbie), i would associate more with a real CMS than with active admin, that is to say, i must add pictures (through url addresses on amazon S3), embed videos, associate features on certain deals such as vote up or down, and have a sort of html5 WYSIWYG html/text editor allowing me like i'd do on a wordpress site to move/add/arrange/re-position between each others texts, videos, sliders, call to action buttons, videos and much more.
I feel activeadmin is great for basic monitoring and maybe creation of objects for simple cases but as it works so much "automagically" I fear I won't have enough control or ability to bring many features and CMS stuff into active admin that i should build the "Deals admin Interface" on my own pages and not rely on active Admin for this.
What do you think about it ? Can I put all that stuff "inside" my Active Admin pages/controllers...or should I build it "outside" active admin ?
Thanks for your help!
any answer for this question will be subjective..
formally, you can override anything (views, models, controllers) in activeadmin very easily. all this cases have minimal but enough instructions in documentation
there are some difficulties to override look&feel for example with bootstrap to receive more responsive layouts but in general case AA is administration framework designed for generic backends so this feature is not critical
according to your question to manage forms it supports formtastic so you can use any power of this gem
you can override form with generic _form.html.erb in one line with form :partial => "form"
you can use html-editors like this or this or other (like this) out of the box
BUT
this moment always insensibly comes when you begin to understand that some features can be done much better without any gem (not only activeadmin)
the real question is when will you cross this line but it is only up to you..
my advice: try to imagine most difficult issue and implement it with activeadmin. if you solve it with activeadmin - you can try to use it in future. if not => ...
one more thing: you can look at rails-admin - it is very promising and competitive to AA

Rails + ActiveAdmin + page cms

So I want to play with the active_admin gem. Two basic pieces I need is pages and images. I could setup a system myself, but is there any gems or anything out there that make setting this up easy? Ideally the pages would have ability to have custom slugs, nested pages, custom fields etc. And maybe ability to add images to the pages.
Yes yes maybe I should just go with a system like refinery. But I'm curious if there something lighter out there for what I need.
My suggestion: if you want the "lightweight" way, just go to implement your own CMS.
In my experience, for rails application, rebuilt is much easier and faster than refactoring/reuse, if your requirement is kinda of complex.
Maybe you should have a look at active_cms, which is still in active development, but already useful for basic functionality. You can find it here: https://github.com/geisters/active_cms

Symfony admin generator: To be or not to be?

on the last projects i've started, I wondered if I should use the admin generator or not. My usual choice is to not use it, as some developers suggested to me, "unless it's for quick backend prototyping and submission to client", they said. Currently i'm starting a project and i'm in the situation that the client need the backend very fast to start loading lots of data, and i'm doubting about using the admin generator or not. I would use it if needed simple form fields. But one of my models must have multiple images, and maybe I need a more complex view that allow the client to load N images, so the admin generator maybe it's not the best choice, but it seems fast, it seems to save time and that's what I need now, time saving!
The project is very simple, it's just a Product model with multiple images and multiple sizes and belongs to a simple category.
What do you think? What would be the best option for this? And where do you think that makes sense to use the admin generator or the regular module generator?
Thanks in advance!
Regards.
I use the admin generator as much as possible. It is really designed to be great for the "backend" of your website-- the administrative screens which authors and editors will use to maintain the app. Any module that needs to be user-editable and is simple cries out for the admin generator.
Recently I have been starting everything with the admin generator so that there's a working prototype to build data with. Then I select certain modules or views that need more magic sauce, and build them out with more customization.
Remember, you can add views and forms to an admin generator module. On my last project I used the admin generator for the "edit" action of my main object but added "show" methods similar to a non-admin-generator form-- adding an executeShow() action and showSuccess template.
The other thing to keep in mind is that the admin generator is only a generator. It writes a bunch of code for you in cache/frontend/env/modules, but you can override any of it by building the equivalent code in apps/frontend/modules/. If you find one part of it that you can't configure with generator.yml, you can copy the file out of the cache into your module dir and hack away. I prefer to take the "out of the box" admin generator as far as possible before customizing it, though.
i've been working with symfony for quite some time now and i've been using the admin generator for simply and complex situations. It's true that it saves time when developing CRUD modules, but i dont think that is not advisable for complex cases.
I think you should use it and also learn the power of customization the generator gives you. If you have complex Forms, leave that for form classes to manage and as you said, if your forms a quite more complex to render, well you should only take care of the rendering of that only segment of the view.
But, if you decide to make if without it, you should start thinking about creating all the view from scrap, that in my case takes quite time ( i'm not so versatile wiht css).
But this is only my opinion, hope this helps you make a more rational choice!

Rails, One Model, Many Screens

I have a model with many fields (nearly 40). The client wants the fields divided among multiple screens. The model also has a few has_manys that should look like they are part of the same model.
How can one divide the model, and what are the tradeoffs among the ways to do it?
I see a couple of possibilities:
1) Use JavaScript to show and hide parts of the form. I think I can make that one work.
2) Use forms that submit to different actions. Can form_for be used with appropriate options?
I'm looking for other ideas too.
Check out acts as state machine. You can use this to create wizards and whatnot.
Having reread your question, I think Javascript is really what you're looking for. Check out jQuery UI, they've got a tab component that will probably help.
I would check out the ActsAsWizard plugin. Makes doing a wizard like this extremely simple.
Check out the readme it is excellent.

Resources