Add options to hide add/edit buttons on associated fields #1566

Merged
merged 4 commits into from Mar 21, 2013

Projects

None yet

5 participants

@neilang
Contributor
neilang commented Mar 15, 2013

There are cases where you may want to authorize access to a model, but not display the add/edit buttons in an associated form field.

e.g. Allow the user to add/edit teams, but remove the inline buttons on the player form.

config.model 'Player' do
   field team do
      inline_add false
      inline_edit false
  end
end

example

@coveralls

Coverage decreased (-1.96%) when pulling eb101cc on neilang:master into 51f2c8b on sferik:master.

View Details

@dalpo
Contributor
dalpo commented Mar 20, 2013

+1

@sferik
Owner
sferik commented Mar 20, 2013

Please add tests for this new configuration.

Also, please replace and, or, and not with &&, ||, and !, respectively.

@coveralls

Coverage increased (+1.31%) when pulling 482265b on neilang:master into 51f2c8b on sferik:master.

View Details

@coveralls

Coverage increased (+1.29%) when pulling 482265b on neilang:master into 51f2c8b on sferik:master.

View Details

@coveralls

Coverage increased (+1.33%) when pulling 482265b on neilang:master into 51f2c8b on sferik:master.

View Details

@coveralls

Coverage decreased (-3.14%) when pulling 9c937ac on neilang:master into 51f2c8b on sferik:master.

View Details

@coveralls

Coverage increased (+1.23%) when pulling 9c937ac on neilang:master into 51f2c8b on sferik:master.

View Details

@coveralls

Coverage increased (+1.23%) when pulling 9c937ac on neilang:master into 51f2c8b on sferik:master.

View Details

@bbenezech
Collaborator

Thanks a lot!

@bbenezech bbenezech merged commit 8533e5a into sferik:master Mar 21, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment