devise-bootstrap-views 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32d447d978731a77f131e95233583426e7ccb681
4
- data.tar.gz: f226b1a961d9588ad0aafbdf8d087b269aca2fb5
3
+ metadata.gz: e9d50e46f8c9c6971fe503df697130894a19ef6a
4
+ data.tar.gz: c73448e49c861a62376197e9d3057e0beaf09635
5
5
  SHA512:
6
- metadata.gz: f133d667f1dbb6ea075a14c23b3d64e4b167d4e1ac68b22617c4e00a50c61fc3add0d15d61abb61e574748adca81eaa9a2c99aa9108309a8d4501af492410386
7
- data.tar.gz: 4f3f8db514dc0f32a86c9698d4736eb92c4311ba75a90e6a9aaae2608476f532f27548cc41d4fcded98caf5fc00a3b4d92927e5f6c13dd39740389b1f9602a9d
6
+ metadata.gz: 1c3671c927711346589aa08591c09b45133215a546acb59f0fc85a17f964bcf32d0a0bd63d1d4abe2f3d1f47f62351eef0a5ae814cfc8121cd738c3bc1433c26
7
+ data.tar.gz: 97d578a8c17b068a791a12ed9e7ca21564993e8b707e06127641536f777a5c5d911e1af3a2d61371cabe84d690ba642ca4566c6c7d16a1d3f6dbae188ad4d30e
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions') %></h4>
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.change_your_password', :default => 'Change your password') %></h4>
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h4>
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.title', :resource => resource_class.model_name.human , :default => 'Edit #{resource_name.to_s.humanize}') %></h4>
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.sign_up', :default => "Sign up") %></h4>
@@ -1,4 +1,4 @@
1
- <%= devise_error_messages! %>
1
+ <%= bootstrap_devise_error_messages! %>
2
2
  <div class="panel panel-default">
3
3
  <div class="panel-heading">
4
4
  <h4><%= t('.resend_unlock_instructions', :default => "Resend unlock instructions") %></h4>
@@ -1,15 +1,18 @@
1
1
  require 'rails'
2
+ require 'devise_bootstrap_views_helper'
2
3
  module DeviseBootstrapViews
3
4
  class Engine < ::Rails::Engine
4
5
  end
5
6
 
6
7
  class Railtie < ::Rails::Railtie #:nodoc:
7
- initializer 'rails-i18n-views' do |app|
8
+ initializer 'rails-devise-bootstrap-views' do |app|
8
9
  DeviseBootstrapViews::Railtie.instance_eval do
9
10
  pattern = pattern_from app.config.i18n.available_locales
10
11
 
11
12
  files = Dir[File.join(File.dirname(__FILE__), '../locales', "#{pattern}.yml")]
12
13
  I18n.load_path.concat(files)
14
+
15
+ ActionView::Base.send :include, DeviseBootstrapViewsHelper
13
16
  end
14
17
  end
15
18
 
@@ -21,3 +24,5 @@ module DeviseBootstrapViews
21
24
  end
22
25
  end
23
26
  end
27
+
28
+
@@ -1,5 +1,5 @@
1
1
  module DeviseBootstrapViewsHelper
2
- def devise_error_messages!
2
+ def bootstrap_devise_error_messages!
3
3
  return '' if resource.errors.empty?
4
4
 
5
5
  messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DeviseBootstrapViews
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-bootstrap-views
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yinghai Zhao
@@ -52,7 +52,6 @@ files:
52
52
  - Rakefile
53
53
  - Screenshot.png
54
54
  - app/assets/stylesheets/devise_bootstrap_views.scss
55
- - app/helpers/devise_bootstrap_views_helper.rb
56
55
  - app/views/devise/confirmations/new.html.erb
57
56
  - app/views/devise/mailer/confirmation_instructions.html.erb
58
57
  - app/views/devise/mailer/reset_password_instructions.html.erb
@@ -66,6 +65,7 @@ files:
66
65
  - app/views/devise/unlocks/new.html.erb
67
66
  - devise-bootstrap-views.gemspec
68
67
  - lib/devise-bootstrap-views.rb
68
+ - lib/devise_bootstrap_views_helper.rb
69
69
  - lib/generators/devise/views/bootstrap_templates/bootstrap_templates_generator.rb
70
70
  - lib/generators/devise/views/locale/locale_generator.rb
71
71
  - lib/version.rb