From 20b88b8b423346aa4836d3d64c27924a1b6ba9e2 Mon Sep 17 00:00:00 2001 From: Lee Lawlor Date: Wed, 12 Nov 2014 14:17:25 -0500 Subject: [PATCH] return to plugin edit page when plugin is saved --- app/controllers/plugins_controller.rb | 3 ++- config/locales/en.yml | 1 + db/schema.rb | 15 ++++++++------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/controllers/plugins_controller.rb b/app/controllers/plugins_controller.rb index f28e45f..db7a28f 100644 --- a/app/controllers/plugins_controller.rb +++ b/app/controllers/plugins_controller.rb @@ -142,7 +142,8 @@ class PluginsController < ApplicationController if @plugin.save @plugin.update_all_windows - redirect_to plugins_path and return + flash[:notice] = I18n.t(:plugin_save_message) + redirect_to edit_plugin_path(@plugin) and return end end diff --git a/config/locales/en.yml b/config/locales/en.yml index a43db95..7970d74 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -198,6 +198,7 @@ en: plugin_js: "JavaScript" plugin_name: "Name" plugin_new_message: "Please select a template to use with your new plugin." + plugin_save_message: "Your plugin has been saved." plugin_template: "Plugin Template" plugins: "Plugins" plugin_public_flag: "Make Public?" diff --git a/db/schema.rb b/db/schema.rb index bea464d..e616581 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20141016143645) do +ActiveRecord::Schema.define(version: 20141024161555) do create_table "active_admin_comments", force: true do |t| t.string "namespace" @@ -324,11 +324,11 @@ ActiveRecord::Schema.define(version: 20141016143645) do create_table "timecontrols", force: true do |t| t.integer "user_id" t.integer "schedulable_id" - t.string "schedulable_type", limit: 50 - t.string "frequency", limit: 20 - t.integer "day", limit: 1 - t.integer "hour", limit: 1 - t.integer "minute", limit: 1 + t.string "schedulable_type", limit: 50 + t.string "frequency", limit: 20 + t.integer "day", limit: 1 + t.integer "hour", limit: 1 + t.integer "minute", limit: 1 t.integer "parent_id" t.datetime "last_event_at" t.text "last_response" @@ -336,8 +336,9 @@ ActiveRecord::Schema.define(version: 20141016143645) do t.datetime "updated_at" t.string "name" t.datetime "run_at" - t.integer "fuzzy_seconds", default: 0 + t.integer "fuzzy_seconds", default: 0 t.string "schedulable_value" + t.integer "schedulable_position" end add_index "timecontrols", ["frequency", "minute", "hour", "day"], name: "index_timecontrols_on_frequency_and_minute_and_hour_and_day", using: :btree