Skip to content

Model.create should use role, defined in controller#15

Open
ukolovda wants to merge 13 commits intokrhorst:masterfrom
Tarifer:master
Open

Model.create should use role, defined in controller#15
ukolovda wants to merge 13 commits intokrhorst:masterfrom
Tarifer:master

Conversation

@ukolovda
Copy link
Contributor

@ukolovda ukolovda commented Jun 7, 2013

If role has defined in controller:

controller do
with_role :admin
end

:role => :admin
  Role for create model
:find_by => :id
  If specified, engine will try find object by this field and update it, or create if not found.
  will reset Primary Key sequence (tested on PostgreSQL).
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.

2 participants