No commit activity in last 3 years
No release in over 3 years
Allows the user to fillout a JSON database field by providing text inputs for keys and values along with Add and Remove controls. Currently requires jQuery.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

rails_json_field

A friendly way for users to edit JSON fields in Rails forms.

Installation

Add this line to your application's Gemfile:

gem 'rails_json_field'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_json_field

Note: This gem currently requires jQuery to work.

Usage

Include the following in your javascript manifest:

//= require rails_json_field

Now you're able to use it in forms:

= form_for @foo do |f|
  = f.json_field :bar

Future Features

Some future features include:

  • Removing the jQuery dependency (if possible)
  • Custom class names
  • Better default styling
  • Nested objects
  • Array objects

Thanks

A special thank you to the john_hancock gem for showing me how to structure this kind of gem.