by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gus P
    @staycreativedesign
    @modsaid ok ...
    Gus P
    @staycreativedesign
    @modsaid man this is just blowing my time... I'm getting the senior dev on this
    @modsaid thanks though
    modsaid
    @modsaid
    It is ok. Welcome anytime
    Gus P
    @staycreativedesign
    @modsaid want to pp on it?
    I can load up screen hero...
    Gus P
    @staycreativedesign
    Fruuuuustrating
    Gus P
    @staycreativedesign
    @modsaid resolved
    modsaid
    @modsaid
    @staycreativedesign glad to hear so
    Gus P
    @staycreativedesign
    I used carmen instead of carmen-rails
    Gus P
    @staycreativedesign
    Anyone got experience with authorize.net?
    Chamnap Chhorn
    @chamnap
    Hello, I would like to customize the routes on the show page so that /people/abc@gmail.com would match the routes. Any clues? I can't find way to do it.
    Chamnap Chhorn
    @chamnap
    @timoschilling, based on your solution on here, http://stackoverflow.com/questions/31150327/activeadmin-custom-filter-that-contains-2-words-on-the-same-attribute. where to place the #join method? I can't figure out the class to put in?
    Timo Schilling
    @timoschilling
    @chamnap since activeadmin/activeadmin#4114 it should work out of the box, but I don't have tried it, please take a look and give me some feed back
    Chamnap Chhorn
    @chamnap
    @timoschilling I took different approach this morning by overriding StringInput class. It doesn't work out of the box.

    @timoschilling, I have another question. I need to customize the routes for the show action. I need to set constaints on this route so it could accept email address, but as i can see it only support :method params.

    I want to do something like this, but it doesn 't work.
    member_action :show, constraints: { id: /[^\/]+/ } do @person = find_resource end

    Timo Schilling
    @timoschilling
    That don't work with your way
    Chamnap Chhorn
    @chamnap
    @timoschilling, how to get it work?
    Timo Schilling
    @timoschilling
    I have never used that

    this should work:

    # in app/admin/admin_user.rb
    controller do
      def resource
        AdminUser.find_by(username: params[:id])
      end
    end
    
    # in app/models/admin_user.rb
    def to_param
      username
    end

    https://github.com/activeadmin/activeadmin/issues/3461#issuecomment-57398564

    but you should use super instead of AdminUser (Modelname)
    Chamnap Chhorn
    @chamnap
    The problem is on the routing. It's because the show page url, (/people/abc@gmail.com). It contains dot, so it doesn't match the routes (/people/:id). That's why I need to set constraint on that routes to match that url.
    Timo Schilling
    @timoschilling
    You need to define the route by hand, like a normal route
    You can overwrite the Admin routes
    Nilesh
    @nileshtrivedi
    Can someone help me with this? activeadmin/activeadmin#4189
    Piers Chambers
    @varyonic
    Hi Timo, I see builds have been failing past couple of months on 1.9.3. I saw David was offering to fix (#4624), do you have any feedback for him? Have you considered re-releasing 1.0.0.pre4 as a ‘production ready’ 0.9 with 4.2/1.9.3 support, rather than continuing to spend effort on a Ruby release that ceased receiving security patches February last year? @timoschilling
    Nate Beck
    @natebeck
    Does anybody know a way to force a model field named "color" to be a text input instead of a color picker?
    Oh nevermind, missed the colon f.input :color, as: :string works
    Abram Bailey
    @abrambailey
    One major issue I have with ActiveAdmin right now is that related form selects are not restricted based on selections from other fields. For example, if I select a state, I still see a list of cities in all states. How do I adjust the available selections for cities based on the selected state?
    Piers Chambers
    @varyonic
    If you want to go beyond what AA provides you can use ERB view templates and attach your own Javascript.
    Abram Bailey
    @abrambailey
    I am not even sure that this is beyond AA, wanted to figure that out first
    Piers Chambers
    @varyonic
    AA just wraps Formtastic and provides a basic has-many master details. Beyond that you need to elaborate your own forms.
    Abram Bailey
    @abrambailey
    Thanks Piers, I think I understand. Are you aware of any guide/walkthrough for making more complicated modifications
    a starting point for me?
    or if there is a way to reference a selection on the page using formtastic and send that as a param to an ajax route (using formtastic)?
    Piers Chambers
    @varyonic
    Ah. The Platanus plugin is good.
    Beyond the docs you just have to dig into the AA code and maybe the plugins https://github.com/activeadmin/activeadmin/wiki/Plugins
    Abram Bailey
    @abrambailey
    Gotcha, ok thanks for your help. Yeah, the Platanus plugin works well, but some limitations, and I'm really not looking for a typeahead ajax solution, so much as populating my next select form based on the previous one.. (a single ajax request)
    Piers Chambers
    @varyonic
    We have that in an in-house app, we even used React/GraphQL, but once you’ve navigated to a resource form in AA it’s all regular Rails stuff.
    Abram Bailey
    @abrambailey
    Yeah, that makes sense. I am overhauling some data model design and started looking at AA as a way to avoid rebuilding all my forms.
    Piers Chambers
    @varyonic
    In Chrome tools I see app-bundle-cb2cc87.. being used.
    Never mind
    Piers Chambers
    @varyonic
    @abrambailey I was researching another question and found https://github.com/holyketzer/activeadmin-ajax_filter may be of interest.
    Nguyễn Bảo Thi
    @baothi
    hello all
    Nguyễn Bảo Thi
    @baothi
    who can help me
    class Shipment < ActiveRecord::Base has_many :milestones, :dependent => :destroy end
    class Milestone < ActiveRecord::Base belongs_to :shipment end
    ActiveAdmin.register Shipment, as: "Surveys" do filter :milestones_address_contains_all,label: "Location", :as => :select2_multiple, multiple: true ,:collection =>%W[ AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY ] end
    when i choose 1, It runs out to the right data but when i choose 2 , it runs not out data
    Piers Chambers
    @varyonic
    Try StackOverflow.
    Dirceu Pauka Junior
    @dirceup
    Hi. How can i check in ApplicationController if I'm inside some ActiveAdmin route?
    Piers Chambers
    @varyonic
    Hmm, all ActiveAdmin controllers inherit from ActiveAdmin::BaseController. Sorry, I check StackOverflow more frequently than here.