diff options
| author | Zakaria BOUZIANE | 2015-04-15 13:50:36 +0200 |
|---|---|---|
| committer | Zakaria BOUZIANE | 2015-04-15 13:50:36 +0200 |
| commit | 16bad9981f6804afd3345e0cb3dbab258142f93c (patch) | |
| tree | 9761568a797553ad703302654e746f2342289ca8 | |
| parent | c84c37af67f0188d6c08b8bc7399f8f570145bb0 (diff) | |
| download | chouette-core-16bad9981f6804afd3345e0cb3dbab258142f93c.tar.bz2 | |
Fix unregistred referential params #0034927
| -rw-r--r-- | app/controllers/referentials_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index a0ca4b4ea..375ce126a 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -28,6 +28,9 @@ class ReferentialsController < BreadcrumbController end protected + + alias_method :referential, :resource + def resource @referential ||= current_organisation.referentials.find_by_id(params[:id]) end @@ -48,8 +51,9 @@ class ReferentialsController < BreadcrumbController super end - def permitted_params - params.permit(referential: [ :name, :slug, :prefix, :time_zone, :upper_corner, :lower_corner, :organisation_id ]) + private + def referential_params + params.require(:referential).permit( :id, :name, :slug, :prefix, :time_zone, :upper_corner, :lower_corner, :organisation_id, :projection_type, :data_format ) end end |
