Skip to content

Update README.md usage instructions#2

Open
rossshannon wants to merge 2 commits into
sudosu:masterfrom
rossshannon:use-configure-instead-of-edit
Open

Update README.md usage instructions#2
rossshannon wants to merge 2 commits into
sudosu:masterfrom
rossshannon:use-configure-instead-of-edit

Conversation

@rossshannon
Copy link
Copy Markdown

The current instructions in the README:

RailsAdmin.config do |config|
  config.model User do
    edit do
      field :latitude, :map
    end
  end
end

result in all the other fields in the model being hidden in rails_admin. I have updated the usage instructions to be

RailsAdmin.config do |config|
  config.model User do
    configure :latitude, :map
    configure(:longitude) { visible false }
  end
end

which will not affect other fields on the model. It also hides the model’s original longitude field, as this is not needed, since the plugin adds the dynamic lat/lng fields below the map.

...so that other fields on the model with the latitude field are not hidden in rails_admin.
fintanf pushed a commit to rossshannon/rails_admin_map_field that referenced this pull request Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant