From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- .../gs_cluster_sync_log_entries_controller.rb | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/controllers/gs_cluster_sync_log_entries_controller.rb (limited to 'app/controllers/gs_cluster_sync_log_entries_controller.rb') diff --git a/app/controllers/gs_cluster_sync_log_entries_controller.rb b/app/controllers/gs_cluster_sync_log_entries_controller.rb new file mode 100644 index 0000000..3e65037 --- /dev/null +++ b/app/controllers/gs_cluster_sync_log_entries_controller.rb @@ -0,0 +1,25 @@ +class GsClusterSyncLogEntriesController < ApplicationController + + # GET /gs_cluster_sync_log_entries/new.json + def new + @gs_cluster_sync_log_entry = GsClusterSyncLogEntry.new + + respond_to do |format| + format.json { render json: @gs_cluster_sync_log_entry } + end + end + + # POST /gs_cluster_sync_log_entries.json + def create + @gs_cluster_sync_log_entry = GsClusterSyncLogEntry.new(params[:gs_cluster_sync_log_entry]) + + respond_to do |format| + if @gs_cluster_sync_log_entry.save + format.json { render json: @gs_cluster_sync_log_entry, status: :created, location: @gs_cluster_sync_log_entry } + else + format.json { render json: @gs_cluster_sync_log_entry.errors, status: :unprocessable_entity } + end + end + end + +end -- cgit v1.2.3