diff options
| author | Alban Peignier | 2016-05-04 15:49:57 +0200 |
|---|---|---|
| committer | Alban Peignier | 2016-05-04 15:49:57 +0200 |
| commit | 84dad3d53cc9ee0f237c5065314de00b1b0c7e5e (patch) | |
| tree | 381c85b49101d99185d53f35e7ce5ff832fdfee6 /app/controllers/referentials_controller.rb | |
| parent | 63c4406d7a9b1efcccd74dd67c338be48c71b1b8 (diff) | |
| download | chouette-core-84dad3d53cc9ee0f237c5065314de00b1b0c7e5e.tar.bz2 | |
Create StopAreaReferential with a basic controller and a seed for STIF context. Refs #820
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index b03aec7e1..34ba37380 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -11,7 +11,7 @@ class ReferentialsController < BreadcrumbController @referential.data_format = current_organisation.data_format end end - + def show resource.switch show! do |format| @@ -34,18 +34,18 @@ class ReferentialsController < BreadcrumbController def resource @referential ||= current_organisation.referentials.find_by_id(params[:id]) end - + def collection @referentials ||= current_organisation.referentials.order(:name) end - + def build_resource super.tap do |referential| referential.user_id = current_user.id referential.user_name = current_user.name end end - + def create_resource(referential) referential.organisation = current_organisation super @@ -54,6 +54,6 @@ class ReferentialsController < BreadcrumbController 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 end |
