Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from Mar 21, 2013

Conversation

neilang
Copy link
Contributor

@neilang 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
Copy link

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

View Details

@dalpo
Copy link
Contributor

dalpo commented Mar 20, 2013

+1

@sferik
Copy link
Collaborator

sferik commented Mar 20, 2013

Please add tests for this new configuration.

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

@coveralls
Copy link

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

View Details

@coveralls
Copy link

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

View Details

@coveralls
Copy link

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

View Details

@coveralls
Copy link

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

View Details

@coveralls
Copy link

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

View Details

1 similar comment
@coveralls
Copy link

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

View Details

@bbenezech
Copy link
Collaborator

Thanks a lot!

bbenezech added a commit that referenced this pull request Mar 21, 2013
Add options to hide add/edit buttons on associated fields
@bbenezech bbenezech merged commit 8533e5a into railsadminteam:master Mar 21, 2013
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.

None yet

5 participants