Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ActiveAdmin-Globalize3-inputs

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ActiveAdmin-Globalize3-inputs

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

This small hack implements has_many friendly Globalize3 helper for ActiveAdmin.

Admittedly it generates structure that jQueryUI tabs() expect. However the whole idea is pretty simple and you should be able to change it to suit your needs.

Installation

Add this line to your application's Gemfile:

gem 'ActiveAdmin-Globalize3-inputs'

And then execute:

$ bundle

Usage by example

ActiveAdmin.register Gallery do
  form do |f|
    f.globalize_inputs :translations do |lf|
      lf.inputs do
        lf.input :title
        lf.input :description

        lf.input :locale, :as => :hidden
      end
    end

    f.has_many :photos do |photo|
      photo.inputs do
        photo.input :image, :as => :file
      end

      photo.globalize_inputs :translations do |lp|
        lp.inputs do
          lp.input :description

          lp.input :locale, :as => :hidden
        end
      end
    end

    f.buttons
  end
end

As you can see, there's no special option for locales. The list is taken from I18n.available_locales, so you'd probably want to define the locales your application works with somewhere.

Contributing

  1. Fork
  2. Invent better name
  3. Improve
  4. Enjoy

FAQs

Package last updated on 04 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc