- <%= frm.submit %>
+ <%= frm.submit "Save For Later", :name => "save" %>
+ <%= frm.submit "Publish", :name => "send", data: { confirm: 'Once you send to BetterVideo, you cannot edit again. Are you sure?' } %>
<% end %>
\ No newline at end of file
diff --git a/app/views/campaigns/index.html.erb b/app/views/campaigns/index.html.erb
index 2118eb1..ad9da97 100644
--- a/app/views/campaigns/index.html.erb
+++ b/app/views/campaigns/index.html.erb
@@ -7,7 +7,7 @@
<%= image_tag(@videolisting.get_preview_url) %>
diff --git a/db/migrate/20140429154347_remove_published_from_campaign.rb b/db/migrate/20140429154347_remove_published_from_campaign.rb
new file mode 100644
index 0000000..1ce7c78
--- /dev/null
+++ b/db/migrate/20140429154347_remove_published_from_campaign.rb
@@ -0,0 +1,5 @@
+class RemovePublishedFromCampaign < ActiveRecord::Migration
+ def change
+ remove_column :campaigns, :processed
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 59e74e8..24f0636 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: 20140425201114) do
+ActiveRecord::Schema.define(version: 20140429154347) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -51,7 +51,6 @@ ActiveRecord::Schema.define(version: 20140425201114) do
t.string "websiteurl"
t.datetime "created_at"
t.datetime "updated_at"
- t.boolean "processed"
t.boolean "sent", default: false
t.string "awards"
t.string "background"
diff --git a/spec/controllers/campaigns_controller_spec.rb b/spec/controllers/campaigns_controller_spec.rb
index d6975b7..623081b 100644
--- a/spec/controllers/campaigns_controller_spec.rb
+++ b/spec/controllers/campaigns_controller_spec.rb
@@ -79,9 +79,9 @@ describe CampaignsController do
#line 63 camp_controller
end
- it "doesn't allow edits on an already published campaign" do
+ it "doesn't allow edits on an already sent campaign" do
camp = FactoryGirl.create(:campaign)
- camp.processed = true
+ camp.sent = true
camp.save
get :edit, listingcode: camp.listingcode
expect(response.status).to eq 302
diff --git a/spec/factories/campaigns.rb b/spec/factories/campaigns.rb
index d39122f..4053cd6 100644
--- a/spec/factories/campaigns.rb
+++ b/spec/factories/campaigns.rb
@@ -25,7 +25,7 @@ FactoryGirl.define do
vpa "John Smith"
websiteurl "bobsbbq.com"
zip "90200"
- processed false
+ sent false
after(:build) do |campaign, evaluator|
video = FactoryGirl.create(:videolisting)
campaign.videolistings << video