tb_core 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10dce243e38a7dda2ea1667da4ef47454d6c07c7
4
- data.tar.gz: 21119a1481d42568af16b0afac0772b613b3eced
3
+ metadata.gz: 6a641b08c309d6355240a0cb59dec84b96552572
4
+ data.tar.gz: 96c0a3a67b8df216c83c695bddc5111f0239ece1
5
5
  SHA512:
6
- metadata.gz: 52a4a4a753ce259fc37b70763755d83b886b366f77700f5ffbe479cb2ae91cba6b85ce02a77d3af4f4eec2dd45b1e25c037cc6c6161b5d486caffceb460b3ae6
7
- data.tar.gz: 189b24c1e07af8ecd989bd9420e62d72976858ecb58274b5ff4db4f618a2bce452e1f5b34805df4f694613b35d15f269846c805ad884390d1c323c86565c2532
6
+ metadata.gz: 7eacaae333704ced506a7d920ac533c818460237cbf60f06698bf993e142c5d59e0d85d7478da2e470e2ceee7ca7b20a3ac3a2039865530cbcfca72a32dfdd9d
7
+ data.tar.gz: c5de32f69349861b4672df836ecbe24179f33c1c1cf55d968fac1171c3c6ff4728899c23b7ee372d73e4b2738038299e1a3412c081ac61831b713ee7575847cf
@@ -24,7 +24,7 @@ class Admin::UserSessionsController < Admin::ApplicationController
24
24
  end
25
25
 
26
26
  def destroy
27
- current_user_session.destroy
27
+ current_user_session.destroy unless current_user_session.blank?
28
28
  flash[:notice] = "Logout successful!"
29
29
  redirect_to admin_login_path
30
30
  end
@@ -1,11 +1,16 @@
1
1
  module TwiceBaked::ApplicationHelper
2
2
 
3
- def tb_form_errors(record)
3
+ def tb_form_errors(record, *fields_to_display)
4
4
  if record.errors.any?
5
5
  content_tag :div, :class => 'form-errors' do
6
6
  concat(tb_form_error_header(record))
7
7
  concat(raw "<ul>")
8
- concat(raw record.errors.full_messages.collect{ |msg| "<li>#{msg}</li>" }.join())
8
+ if fields_to_display.any?
9
+ messages = fields_to_display.collect{ |field| record.errors.full_messages_for(field) }.flatten()
10
+ else
11
+ messages = record.errors.full_messages
12
+ end
13
+ concat(raw messages.collect{ |msg| "<li>#{msg}</li>" }.join())
9
14
  concat(raw "</ul>")
10
15
  end
11
16
  end
@@ -23,7 +23,7 @@
23
23
  <td class="table-actions">
24
24
  <%= link_to 'Details', admin_user_path(spud_user), :class => 'btn btn-default btn-sm' %>
25
25
  <%= link_to 'Edit', edit_admin_user_path(spud_user), :class => 'btn btn-default btn-sm' %>
26
- <%= link_to 'Delete', admin_user_path(spud_user), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this Comic book?'}, :class => 'btn btn-danger btn-sm' %>
26
+ <%= link_to 'Delete', admin_user_path(spud_user), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this user?'}, :class => 'btn btn-danger btn-sm' %>
27
27
  </td>
28
28
  </tr>
29
29
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <%%= form_for [:admin, @<%=module_name_formatted.singularize%>], :builder => TbCore::FormBuilder, :html => {:class => 'form-horizontal'} do |f| %>
2
2
 
3
- <%%= tb_form_error_header(f.object) %>
3
+ <%%= tb_form_errors(f.object, :base) %>
4
4
  <%- attributes.collect{ |att| att.split(':') }.each do |arg_0, arg_1| %>
5
5
  <%= field_for_attribute(arg_1, arg_0) %>
6
6
  <%- end %>
@@ -17,6 +17,21 @@ module Spud
17
17
  self.production_alert_domain = nil
18
18
  self.use_email_as_login = false
19
19
 
20
+ def self.site_config_for_host(host)
21
+ ActiveSupport::Deprecation.warn 'Spud::Core.site_config_for_host is deprecated and will be removed in the future'
22
+ return default_site_config
23
+ end
24
+
25
+ def self.site_config_for_id(id)
26
+ ActiveSupport::Deprecation.warn 'Spud::Core.site_config_for_id is deprecated and will be removed in the future'
27
+ return default_site_config
28
+ end
29
+
30
+ def self.default_site_config
31
+ ActiveSupport::Deprecation.warn 'Spud::Core.default_site_config is deprecated and will be removed in the future'
32
+ return {:site_id => Spud::Core.config.site_id, :site_name => Spud::Core.config.site_name, :short_name => Spud::Core.config.short_name}
33
+ end
34
+
20
35
  def self.append_admin_javascripts(*args)
21
36
  if args[0].class == Array
22
37
  Spud::Core.config.admin_javascripts += args[0]
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Core
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Woods
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-02 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails