tb_banners 1.0.2 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjQ3MjEyYWJkZjdiNjEyN2VjMjQ1NWJlMzVmMjYyNTcxYWNhOTY1Yg==
5
- data.tar.gz: !binary |-
6
- ZDE5OTMxYmEyYWUyOWVjNWMwZmFiMDQwMWY3MmU5YWQwZTk5OWQwOA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZTdjMmJiNzI0YTI1MzQ4MDY1ODFkZDM3ZGM3ZGM1N2U4OTYzZWQ2ZjZlZDI0
10
- NTkwM2NlMGQyOWNlODg3MWNkZTk4NWFiNmY3MGU0NWM0NTY5YmU5ZGE3YjM3
11
- ZDNhODJjYWZjZTc1MzkwOTlhYTE0M2EzYzAwZGQ0ZWM3MzE2NjA=
12
- data.tar.gz: !binary |-
13
- ZGRjZTQ1NjNkMzFjNjcyODBiNGI0MGRlOTU1MjU0Yzk2YTMzN2UwY2Y3MTY1
14
- ZTI2YmVkZTk0NTljMjczNzVjM2M1ZGYwZjRmZTljZmQ1NmRjMGQ4MTkwNDlh
15
- NDhmYmU4YjI0YWVkNmJiYmVkOTk3YTM2OWNkMWUyNmVkYzdhOTk=
2
+ SHA1:
3
+ metadata.gz: 8e831e21b2d55bc27d1fb1309f285fd88778c73b
4
+ data.tar.gz: 7c21487ee577fce3696d40aa050eaa700c69e5b8
5
+ SHA512:
6
+ metadata.gz: f7ecbd063a6ad0896cb314af51b07292c145f2e25b9ddc7ce1635f589410f560cea040cc64d647643083336906df1d59ff29dcb61506c864cb96c2a224d8cc49
7
+ data.tar.gz: 20ce6d2036099e7e5e431e68f9ab8f71609df53c7c08b8e7758ae4387e35311ed5e7b0fd1cba3e0e72fe19f8a7fe516d0423fbbb4c2d7b3c35f3ffda6cda91f9
data/README.markdown CHANGED
@@ -1,12 +1,12 @@
1
- # Spud Banners
1
+ # Twice Baked Banners
2
2
 
3
- Spud Banners is an engine for creating and managing rotating banner sets, designed for use with [Spud][spud].
3
+ TB Banners is an engine for creating and managing rotating banner sets, designed for use with [Twice Baked][tb].
4
4
 
5
5
  ## Installation/Usage
6
6
 
7
7
  1. In your Gemfile add the following
8
8
 
9
- gem 'spud_banners'
9
+ gem 'tb_banners'
10
10
 
11
11
  2. Run bundle install
12
12
  3. Copy in database migrations to your new rails project
@@ -14,11 +14,11 @@ Spud Banners is an engine for creating and managing rotating banner sets, design
14
14
  bundle exec rake railties:install:migrations
15
15
  rake db:migrate
16
16
 
17
- 4. Run a rails server instance and point your browser to `/spud/admin`
17
+ 4. Run a rails server instance and point your browser to `/admin`
18
18
 
19
19
  ## Configuration
20
20
 
21
- Spud Banners accepts the following configuration options:
21
+ TB Banners accepts the following configuration options:
22
22
 
23
23
  ```ruby
24
24
  Spud::Banners.configure do |config|
@@ -31,7 +31,7 @@ end
31
31
 
32
32
  ## Creating a Banner Set
33
33
 
34
- Banner Sets are created in the Spud admin. When creating a Set, you have the following options:
34
+ Banner Sets are created in the admin dashboard. When creating a Set, you have the following options:
35
35
 
36
36
  - **Name:** The unique identifier used to render this set
37
37
  - **Width:** Maximum width of uploaded banners
@@ -99,7 +99,7 @@ Displaying banners using the helper, with a block for even more custom html.
99
99
 
100
100
  ## Liquid
101
101
 
102
- Spud Banners comes with its own custom [Liquid][liquid] tag. For now the liquid tag only supports rendering the standard html as generated by the `spud_banners_for_set`. Will provide support more advanced options in the future.
102
+ TB Banners comes with its own custom [Liquid][liquid] tag. For now the liquid tag only supports rendering the standard html as generated by the `spud_banners_for_set`. Will provide support more advanced options in the future.
103
103
 
104
104
  Usage:
105
105
 
@@ -107,9 +107,28 @@ Usage:
107
107
  <%= raw Liquid::Template.parse("{% spud_banner_set Promotions %}").render %>
108
108
  ```
109
109
 
110
+ ## Rich Text
111
+
112
+ Banner Sets contain a configuration for rich text. Turning this feature on will enable a rich text editor on individual banners. The default setting for this option is off.
113
+
114
+ Rich text is intended to be more of an edge case feature, and should be used only if your banner needs to include an editable HTML block. The built-in helpers described earlier will not automatically include your rich text; If you want to use this feature, you should supply a block to the helper and render the rich text yourself.
115
+
116
+ ```erb
117
+ <ul id="slides">
118
+ <% spud_banners_for_set(:promotions) do |banner| %>
119
+ <li class="custom_slide">
120
+ <%= spud_banner_tag(banner) %>
121
+ <div class="custom_slide_rich_text">
122
+ <%= raw(banner.rich_text) %>
123
+ </div>
124
+ </li>
125
+ <% end %>
126
+ </ul>
127
+ ```
128
+
110
129
  ## Slideshows
111
130
 
112
- Spud Banners does not provide a built-in slideshow animation library. Instead, we make it easy for you to integrate into any number of popular JavaScript slideshow plugins available on the web, or even to write your own from scratch.
131
+ TB Banners does not provide a built-in slideshow animation library. Instead, we make it easy for you to integrate into any number of popular JavaScript slideshow plugins available on the web, or even to write your own from scratch.
113
132
 
114
133
  Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
115
134
 
@@ -131,7 +150,7 @@ Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
131
150
  <script src="/slides.jquery.js" type="text/javascript"></script>
132
151
  <script>
133
152
  $(document).ready(function(){
134
- $("#banners").slides({
153
+ $("#banners").slidesjs({
135
154
  play: 5000,
136
155
  container: 'spud_banner_set'
137
156
  });
@@ -139,6 +158,6 @@ Below is an example of integration with [SlidesJs][slidesjs], a jQuery plugin.
139
158
  </script>
140
159
  ```
141
160
 
142
- [spud]:https://github.com/spud-rails/spud_core_admin
161
+ [tb]:https://bitbucket.org/westlakedesign/tb_core
143
162
  [slidesjs]:http://www.slidesjs.com
144
163
  [liquid]:https://github.com/Shopify/liquid
@@ -1,6 +1,5 @@
1
1
  class Admin::BannerSetsController < Admin::ApplicationController
2
2
 
3
- cache_sweeper :spud_banner_sweeper, :only => [:create, :update, :destroy]
4
3
  before_filter :get_record, :only => [:show, :edit, :update, :destroy]
5
4
  respond_to :html
6
5
  belongs_to_spud_app :banner_sets
@@ -22,7 +21,7 @@ class Admin::BannerSetsController < Admin::ApplicationController
22
21
  end
23
22
 
24
23
  def create
25
- @banner_set = SpudBannerSet.new(params[:spud_banner_set])
24
+ @banner_set = SpudBannerSet.new(banner_set_params)
26
25
  if @banner_set.save
27
26
  flash.now[:notice] = 'BannerSet created successfully'
28
27
  render 'create'
@@ -36,9 +35,8 @@ class Admin::BannerSetsController < Admin::ApplicationController
36
35
  end
37
36
 
38
37
  def update
39
- if @banner_set.update_attributes(params[:spud_banner_set])
38
+ if @banner_set.update_attributes(banner_set_params)
40
39
  flash.now[:notice] = 'BannerSet updated successfully'
41
- @banner_set.reprocess_banners!
42
40
  render 'create'
43
41
  else
44
42
  render 'edit', :status => 422
@@ -65,4 +63,8 @@ private
65
63
  end
66
64
  end
67
65
 
66
+ def banner_set_params
67
+ params.require(:spud_banner_set).permit(:cropped, :height, :name, :short_name, :width, :has_rich_text)
68
+ end
69
+
68
70
  end
@@ -2,7 +2,6 @@ class Admin::BannersController < Admin::ApplicationController
2
2
 
3
3
  include RespondsToParent
4
4
 
5
- cache_sweeper :spud_banner_sweeper, :only => [:create, :update, :destroy]
6
5
  before_filter :get_set, :only => [:new, :create]
7
6
  before_filter :get_record, :only => [:edit, :update, :destroy]
8
7
  respond_to :html
@@ -15,7 +14,7 @@ class Admin::BannersController < Admin::ApplicationController
15
14
 
16
15
  def create
17
16
  @banner = @banner_set.banners.build
18
- @banner.attributes = params[:spud_banner]
17
+ @banner.attributes = banner_params
19
18
 
20
19
  last_banner = SpudBanner.select('sort_order').where(:spud_banner_set_id => @banner_set.id).order('sort_order desc').first
21
20
  if last_banner
@@ -43,14 +42,14 @@ class Admin::BannersController < Admin::ApplicationController
43
42
 
44
43
  def update
45
44
  if request.xhr?
46
- if @banner.update_attributes(params[:spud_banner])
45
+ if @banner.update_attributes(banner_params)
47
46
  flash.now[:notice] = 'SpudBanner created successfully'
48
47
  render 'show'
49
48
  else
50
49
  render 'edit', :status => 422
51
50
  end
52
51
  else
53
- @banner.update_attributes(params[:spud_banner])
52
+ @banner.update_attributes(banner_params)
54
53
  respond_to_parent do
55
54
  render 'legacy', :formats => [:js]
56
55
  end
@@ -101,4 +100,8 @@ private
101
100
  end
102
101
  end
103
102
 
103
+ def banner_params
104
+ params.require(:spud_banner).permit(:banner, :link_to, :link_target, :title, :alt, :sort_order, :rich_text)
105
+ end
106
+
104
107
  end
@@ -1,13 +1,19 @@
1
1
  module SpudBannersHelper
2
2
 
3
3
  def spud_banners_for_set(set_or_identifier, options = {})
4
- limit = options[:limit] || false
5
4
  if set_or_identifier.is_a?(SpudBannerSet)
6
5
  banner_set = set_or_identifier
7
6
  else
8
7
  banner_set = SpudBannerSet.find_by_identifier(set_or_identifier)
9
8
  end
10
9
  return '' if banner_set.blank?
10
+ cache(banner_set) do
11
+ concat spud_banners_set_tag(banner_set, options)
12
+ end
13
+ end
14
+
15
+ def spud_banners_set_tag(banner_set, options = {})
16
+ limit = options[:limit] || false
11
17
  if block_given?
12
18
  banner_set.banners.limit(limit).each do |banner|
13
19
  yield(banner)
@@ -1,6 +1,5 @@
1
1
  class SpudBanner < ActiveRecord::Base
2
- attr_accessible :banner, :link_to, :link_target, :title, :alt, :sort_order, :rich_text
3
- belongs_to :owner, :class_name => 'SpudBannerSet', :foreign_key => 'spud_banner_set_id', :inverse_of => :banners
2
+ belongs_to :owner, :class_name => 'SpudBannerSet', :foreign_key => 'spud_banner_set_id', :inverse_of => :banners, :touch => true
4
3
 
5
4
  has_attached_file :banner,
6
5
  :styles => lambda { |attachment| attachment.instance.dynamic_styles },
@@ -1,11 +1,14 @@
1
1
  class SpudBannerSet < ActiveRecord::Base
2
- attr_accessible :cropped, :height, :name, :short_name, :width, :has_rich_text
3
- has_many :banners, :class_name => 'SpudBanner', :order => 'sort_order asc', :dependent => :destroy, :inverse_of => :owner
2
+ has_many :banners, ->{ order('sort_order asc') }, :class_name => 'SpudBanner', :dependent => :destroy, :inverse_of => :owner
4
3
 
5
4
  validates_presence_of :name
6
5
  validates_uniqueness_of :name
7
6
  validates_numericality_of :width, :height
8
7
 
8
+ acts_as_spud_liquid_tag :spud_banner_set, :name
9
+
10
+ after_update :check_for_dimension_change
11
+
9
12
  def self.find_by_identifier(identifier)
10
13
  if identifier.class == String
11
14
  banner_set = SpudBannerSet.find_by_name(identifier)
@@ -27,4 +30,12 @@ class SpudBannerSet < ActiveRecord::Base
27
30
  return name
28
31
  end
29
32
 
33
+ private
34
+
35
+ def check_for_dimension_change
36
+ if self.height_changed? || self.width_changed? || self.cropped_changed?
37
+ self.reprocess_banners!
38
+ end
39
+ end
40
+
30
41
  end
@@ -5,8 +5,7 @@ module Spud
5
5
  module Banners
6
6
  class BannerSetTag < Liquid::Tag
7
7
 
8
- include Sprockets::Helpers::RailsHelper
9
- include Sprockets::Helpers::IsolatedHelper
8
+ include Sprockets::Rails::Helper
10
9
  include ActionView::Helpers
11
10
  include ActionView::Context
12
11
  include SpudBannersHelper
@@ -16,7 +15,7 @@ module Spud
16
15
  end
17
16
 
18
17
  def tag_name
19
- return 'banner_set'
18
+ return 'spud_banner_set'
20
19
  end
21
20
 
22
21
  def tag_value
@@ -24,9 +23,9 @@ module Spud
24
23
  end
25
24
 
26
25
  def render(context)
27
- return spud_banners_for_set(@banner_set)
26
+ return spud_banners_set_tag(@banner_set)
28
27
  end
29
28
 
30
29
  end
31
30
  end
32
- end
31
+ end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Banners
3
- VERSION = "1.0.2"
3
+ VERSION = "1.1"
4
4
  end
5
5
  end
@@ -28,6 +28,7 @@ module Dummy
28
28
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
29
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
30
  # config.i18n.default_locale = :de
31
+ config.i18n.enforce_available_locales = true
31
32
 
32
33
  # Configure the default encoding used in templates for Ruby 1.9.
33
34
  config.encoding = "utf-8"
@@ -43,12 +44,6 @@ module Dummy
43
44
  # like if you have constraints or database-specific column types
44
45
  # config.active_record.schema_format = :sql
45
46
 
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
47
  # Enable the asset pipeline
53
48
  config.assets.enabled = true
54
49
 
@@ -11,8 +11,15 @@ Dummy::Application.configure do
11
11
  config.serve_static_assets = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
+ # Deprecated
14
15
  # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
+ # config.whiny_nils = true
17
+
18
+ # Do not eager load code on boot. This avoids loading your whole application
19
+ # just for the purpose of running a single test. If you are using a tool that
20
+ # preloads Rails for running tests, you may have to set it to true.
21
+ config.eager_load = false
22
+
16
23
 
17
24
  # Show full error reports and disable caching
18
25
  config.consider_all_requests_local = true
@@ -29,8 +36,9 @@ Dummy::Application.configure do
29
36
  # ActionMailer::Base.deliveries array.
30
37
  config.action_mailer.delivery_method = :test
31
38
 
39
+ # Deprecated
32
40
  # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
41
+ # config.active_record.mass_assignment_sanitizer = :strict
34
42
 
35
43
  # Print deprecation notices to the stderr
36
44
  config.active_support.deprecation = :stderr
@@ -5,3 +5,4 @@
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  Dummy::Application.config.secret_token = 'dacbd8a483ea9645b13e97018089cbc9da8bf98f99a0be873cdb565d8f64c066974f37cbe7e8b4fedaadd057bce78d1d9326b0768120d2a693de8165df286693'
8
+ Dummy::Application.config.secret_key_base = 'b43711419c807b9c9efe9365dd79f87ebe31e9f72e1aa6744c1ecac68aace664c0a3a4f791d92bd2fa324fce1d6d09701a54b88453f131b7c460eeb9c530bd72'
@@ -0,0 +1,13 @@
1
+ # This migration comes from tb_liquid (originally 20140110142037)
2
+ class CreateTbLiquidSpudLiquidTags < ActiveRecord::Migration
3
+ def change
4
+ create_table :spud_liquid_tags do |t|
5
+ t.integer :attachment_id
6
+ t.string :attachment_type
7
+ t.string :tag_name
8
+ t.string :value
9
+ t.timestamps
10
+ end
11
+ add_index :spud_liquid_tags, [:tag_name, :value]
12
+ end
13
+ end
@@ -9,99 +9,110 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(:version => 20130920154448) do
15
-
16
- create_table "spud_banner_sets", :force => true do |t|
17
- t.string "name", :null => false
18
- t.integer "width", :null => false
19
- t.integer "height", :null => false
20
- t.boolean "cropped", :default => true
21
- t.datetime "created_at", :null => false
22
- t.datetime "updated_at", :null => false
23
- t.boolean "has_rich_text", :default => false
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140120174546) do
15
+
16
+ create_table "spud_banner_sets", force: true do |t|
17
+ t.string "name", null: false
18
+ t.integer "width", null: false
19
+ t.integer "height", null: false
20
+ t.boolean "cropped", default: true
21
+ t.datetime "created_at", null: false
22
+ t.datetime "updated_at", null: false
23
+ t.boolean "has_rich_text", default: false
24
24
  end
25
25
 
26
- add_index "spud_banner_sets", ["name"], :name => "index_spud_banner_sets_on_name", :unique => true
26
+ add_index "spud_banner_sets", ["name"], name: "index_spud_banner_sets_on_name", unique: true, using: :btree
27
27
 
28
- create_table "spud_banners", :force => true do |t|
29
- t.integer "spud_banner_set_id", :null => false
28
+ create_table "spud_banners", force: true do |t|
29
+ t.integer "spud_banner_set_id", null: false
30
30
  t.string "link_to"
31
- t.string "link_target", :default => "_self"
31
+ t.string "link_target", default: "_self"
32
32
  t.string "title"
33
33
  t.string "alt"
34
- t.integer "sort_order", :default => 0
34
+ t.integer "sort_order", default: 0
35
35
  t.string "banner_file_name"
36
36
  t.string "banner_content_type"
37
37
  t.integer "banner_file_size"
38
38
  t.datetime "banner_updated_at"
39
- t.datetime "created_at", :null => false
40
- t.datetime "updated_at", :null => false
39
+ t.datetime "created_at", null: false
40
+ t.datetime "updated_at", null: false
41
41
  t.text "rich_text"
42
42
  end
43
43
 
44
- add_index "spud_banners", ["spud_banner_set_id"], :name => "index_spud_banners_on_spud_banner_set_id"
44
+ add_index "spud_banners", ["spud_banner_set_id"], name: "index_spud_banners_on_spud_banner_set_id", using: :btree
45
+
46
+ create_table "spud_liquid_tags", force: true do |t|
47
+ t.integer "attachment_id"
48
+ t.string "attachment_type"
49
+ t.string "tag_name"
50
+ t.string "value"
51
+ t.datetime "created_at"
52
+ t.datetime "updated_at"
53
+ end
54
+
55
+ add_index "spud_liquid_tags", ["tag_name", "value"], name: "index_spud_liquid_tags_on_tag_name_and_value", using: :btree
45
56
 
46
- create_table "spud_permissions", :force => true do |t|
47
- t.string "name", :null => false
48
- t.string "tag", :null => false
49
- t.datetime "created_at", :null => false
50
- t.datetime "updated_at", :null => false
57
+ create_table "spud_permissions", force: true do |t|
58
+ t.string "name", null: false
59
+ t.string "tag", null: false
60
+ t.datetime "created_at", null: false
61
+ t.datetime "updated_at", null: false
51
62
  end
52
63
 
53
- add_index "spud_permissions", ["tag"], :name => "index_spud_permissions_on_tag", :unique => true
64
+ add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
54
65
 
55
- create_table "spud_role_permissions", :force => true do |t|
56
- t.integer "spud_role_id", :null => false
57
- t.string "spud_permission_tag", :null => false
58
- t.datetime "created_at", :null => false
59
- t.datetime "updated_at", :null => false
66
+ create_table "spud_role_permissions", force: true do |t|
67
+ t.integer "spud_role_id", null: false
68
+ t.string "spud_permission_tag", null: false
69
+ t.datetime "created_at", null: false
70
+ t.datetime "updated_at", null: false
60
71
  end
61
72
 
62
- add_index "spud_role_permissions", ["spud_permission_tag"], :name => "index_spud_role_permissions_on_spud_permission_tag"
63
- add_index "spud_role_permissions", ["spud_role_id"], :name => "index_spud_role_permissions_on_spud_role_id"
73
+ add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
74
+ add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
64
75
 
65
- create_table "spud_roles", :force => true do |t|
76
+ create_table "spud_roles", force: true do |t|
66
77
  t.string "name"
67
- t.datetime "created_at", :null => false
68
- t.datetime "updated_at", :null => false
78
+ t.datetime "created_at", null: false
79
+ t.datetime "updated_at", null: false
69
80
  end
70
81
 
71
- create_table "spud_user_settings", :force => true do |t|
82
+ create_table "spud_user_settings", force: true do |t|
72
83
  t.integer "spud_user_id"
73
84
  t.string "key"
74
85
  t.string "value"
75
- t.datetime "created_at", :null => false
76
- t.datetime "updated_at", :null => false
86
+ t.datetime "created_at", null: false
87
+ t.datetime "updated_at", null: false
77
88
  end
78
89
 
79
- create_table "spud_users", :force => true do |t|
90
+ create_table "spud_users", force: true do |t|
80
91
  t.string "first_name"
81
92
  t.string "last_name"
82
93
  t.boolean "super_admin"
83
- t.string "login", :null => false
84
- t.string "email", :null => false
85
- t.string "crypted_password", :null => false
86
- t.string "password_salt", :null => false
87
- t.string "persistence_token", :null => false
88
- t.string "single_access_token", :null => false
89
- t.string "perishable_token", :null => false
90
- t.integer "login_count", :default => 0, :null => false
91
- t.integer "failed_login_count", :default => 0, :null => false
94
+ t.string "login", null: false
95
+ t.string "email", null: false
96
+ t.string "crypted_password", null: false
97
+ t.string "password_salt", null: false
98
+ t.string "persistence_token", null: false
99
+ t.string "single_access_token", null: false
100
+ t.string "perishable_token", null: false
101
+ t.integer "login_count", default: 0, null: false
102
+ t.integer "failed_login_count", default: 0, null: false
92
103
  t.datetime "last_request_at"
93
104
  t.datetime "current_login_at"
94
105
  t.datetime "last_login_at"
95
106
  t.string "current_login_ip"
96
107
  t.string "last_login_ip"
97
- t.datetime "created_at", :null => false
98
- t.datetime "updated_at", :null => false
108
+ t.datetime "created_at", null: false
109
+ t.datetime "updated_at", null: false
99
110
  t.string "time_zone"
100
111
  t.integer "spud_role_id"
101
112
  end
102
113
 
103
- add_index "spud_users", ["email"], :name => "index_spud_users_on_email"
104
- add_index "spud_users", ["login"], :name => "index_spud_users_on_login"
105
- add_index "spud_users", ["spud_role_id"], :name => "index_spud_users_on_spud_role_id"
114
+ add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
115
+ add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree
116
+ add_index "spud_users", ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree
106
117
 
107
118
  end