noodall-form-builder 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,6 +62,9 @@ module Noodall
62
62
 
63
63
  @response.mark_as_spam!
64
64
 
65
+ @form.responses = @form.responses.reject{|r| r == @response }
66
+ @form.save
67
+
65
68
  redirect_to(noodall_admin_form_form_responses_url(@form))
66
69
  end
67
70
 
@@ -23,7 +23,7 @@
23
23
  <td><%= @form.fields.collect{|f| "<strong>#{f.name}:</strong> #{response.string_value(f.underscored_name)}" }.join(",&nbsp;").html_safe %></td>
24
24
  <td><%= h response.created_at.to_formatted_s(:long_dot) %></td>
25
25
  <td><%= link_to 'Delete', noodall_admin_form_form_response_path(@form, response), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this response' %>
26
- <%= link_to 'Mark as Spam', mark_as_spam_noodall_admin_form_form_response_path(@form, response), :class => 'spam', :title => 'Mark this response as spam and delete' %></td>
26
+ <%= link_to('Mark as Spam', mark_as_spam_noodall_admin_form_form_response_path(@form, response), :class => 'spam', :title => 'Mark this response as spam and delete', :confirm => 'Are you sure?') unless response.approved == false %></td>
27
27
  </tr>
28
28
  <% end %>
29
29
  </tbody>
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module FormBuilder
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-form-builder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors: []
13
13