beef-subscribers 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -9,9 +9,11 @@ class SubscribersController < ApplicationController
|
|
9
9
|
flash[:notice] = 'Thank you for subscribing.'
|
10
10
|
redirect_to root_path
|
11
11
|
end
|
12
|
+
format.js
|
12
13
|
format.json { render :json => @subscriber }
|
13
14
|
else
|
14
15
|
format.html
|
16
|
+
format.js
|
15
17
|
format.json { render :json => @subscriber.errors.full_messages, :status => :unprocessable_entity }
|
16
18
|
end
|
17
19
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<h2>Subscribe to our Newsletter</h2>
|
2
|
-
<div class="newsletter-form" id="subscribe_form">
|
3
2
|
<% form_for @subscriber, :method => :post do |f| %>
|
4
3
|
<%= f.error_messages %>
|
5
4
|
<p><%= f.label :name %>
|
@@ -9,4 +8,3 @@
|
|
9
8
|
|
10
9
|
<p><%= f.submit 'Send' %></p>
|
11
10
|
<% end %>
|
12
|
-
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%- if @subscriber.valid? -%>
|
2
|
+
$('#new_subscriber').prepend('<div class="success">Thank You for subscribing</div>');
|
3
|
+
$('#new_subscriber #flash').hide();
|
4
|
+
$('#new_subscriber #flash').slideDown();
|
5
|
+
<%- else -%>
|
6
|
+
var errors = "<%= escape_javascript(error_messages_for :subscriber) %>";
|
7
|
+
$('#new_subscriber').prepend(errors);
|
8
|
+
$('#errorExplanation').hide();
|
9
|
+
$('#new_subscriber #errorExplanation').slideDown();
|
10
|
+
<%- end -%>
|
data/subscribers.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{subscribers}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Daniel Craig"]
|
9
|
-
s.date = %q{2009-08-
|
9
|
+
s.date = %q{2009-08-24}
|
10
10
|
s.email = %q{daniel@wearebeef.co.uk}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
"app/views/admin/subscribers/index.html.erb",
|
26
26
|
"app/views/subscribers/_form.html.erb",
|
27
27
|
"app/views/subscribers/create.html.erb",
|
28
|
+
"app/views/subscribers/create.js.erb",
|
28
29
|
"config/routes.rb",
|
29
30
|
"generators/subscribers_migration/subscribers_migration_generator.rb",
|
30
31
|
"generators/subscribers_migration/templates/migration.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-subscribers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Craig
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-24 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- app/views/admin/subscribers/index.html.erb
|
36
36
|
- app/views/subscribers/_form.html.erb
|
37
37
|
- app/views/subscribers/create.html.erb
|
38
|
+
- app/views/subscribers/create.js.erb
|
38
39
|
- config/routes.rb
|
39
40
|
- generators/subscribers_migration/subscribers_migration_generator.rb
|
40
41
|
- generators/subscribers_migration/templates/migration.rb
|