bootstrap-sass-extras 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/CHANGELOG.md +13 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +115 -97
  6. data/README.md +39 -0
  7. data/Rakefile +11 -1
  8. data/app/helpers/nav_helper.rb +33 -0
  9. data/app/helpers/twitter_breadcrumbs_helper.rb +2 -2
  10. data/app/helpers/url_helper.rb +25 -0
  11. data/lib/bootstrap-sass-extras/engine.rb +2 -0
  12. data/lib/bootstrap-sass-extras/version.rb +1 -1
  13. data/lib/generators/bootstrap/layout/templates/layout.html.erb +6 -6
  14. data/lib/generators/bootstrap/layout/templates/layout.html.haml +6 -6
  15. data/lib/generators/bootstrap/layout/templates/layout.html.slim +6 -6
  16. data/lib/generators/bootstrap/partial/templates/_login.html.erb +6 -6
  17. data/lib/generators/bootstrap/themed/templates/_form.html.erb +6 -6
  18. data/lib/generators/bootstrap/themed/templates/_form.html.haml +5 -5
  19. data/lib/generators/bootstrap/themed/templates/_form.html.slim +5 -5
  20. data/lib/generators/bootstrap/themed/templates/edit.html.erb +2 -2
  21. data/lib/generators/bootstrap/themed/templates/edit.html.haml +2 -2
  22. data/lib/generators/bootstrap/themed/templates/edit.html.slim +2 -2
  23. data/lib/generators/bootstrap/themed/templates/index.html.erb +7 -7
  24. data/lib/generators/bootstrap/themed/templates/index.html.haml +6 -6
  25. data/lib/generators/bootstrap/themed/templates/index.html.slim +6 -6
  26. data/lib/generators/bootstrap/themed/templates/new.html.erb +2 -2
  27. data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -2
  28. data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -2
  29. data/lib/generators/bootstrap/themed/templates/show.html.erb +9 -9
  30. data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -10
  31. data/lib/generators/bootstrap/themed/templates/show.html.slim +4 -4
  32. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  33. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +4 -4
  34. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  35. data/spec/dummy/README.rdoc +15 -248
  36. data/spec/dummy/Rakefile +1 -2
  37. data/spec/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
  38. data/spec/dummy/app/assets/javascripts/application.js +4 -6
  39. data/spec/dummy/app/assets/stylesheets/application.css +6 -4
  40. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  41. data/spec/dummy/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
  42. data/spec/dummy/{lib/assets/.gitkeep → app/mailers/.keep} +0 -0
  43. data/spec/dummy/{log/.gitkeep → app/models/.keep} +0 -0
  44. data/spec/dummy/app/models/concerns/.keep +0 -0
  45. data/spec/dummy/app/views/application/_custom_breadcrumbs.html.erb +1 -0
  46. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  47. data/spec/dummy/bin/bundle +3 -0
  48. data/spec/dummy/bin/rails +4 -0
  49. data/spec/dummy/bin/rake +4 -0
  50. data/spec/dummy/bin/setup +29 -0
  51. data/spec/dummy/config.ru +2 -2
  52. data/spec/dummy/config/application.rb +3 -36
  53. data/spec/dummy/config/boot.rb +4 -9
  54. data/spec/dummy/config/database.yml +8 -8
  55. data/spec/dummy/config/environment.rb +3 -3
  56. data/spec/dummy/config/environments/development.rb +22 -18
  57. data/spec/dummy/config/environments/production.rb +46 -34
  58. data/spec/dummy/config/environments/test.rb +19 -14
  59. data/spec/dummy/config/initializers/assets.rb +11 -0
  60. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  61. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/spec/dummy/config/initializers/inflections.rb +6 -5
  63. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  64. data/spec/dummy/config/initializers/session_store.rb +1 -6
  65. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  66. data/spec/dummy/config/locales/en.yml +20 -2
  67. data/spec/dummy/config/routes.rb +23 -25
  68. data/spec/dummy/config/secrets.yml +22 -0
  69. data/spec/dummy/lib/assets/.keep +0 -0
  70. data/spec/dummy/log/.keep +0 -0
  71. data/spec/dummy/public/404.html +54 -13
  72. data/spec/dummy/public/422.html +54 -13
  73. data/spec/dummy/public/500.html +53 -12
  74. data/spec/helpers/badge_helper_spec.rb +1 -1
  75. data/spec/helpers/bootstrap_flash_helper_spec.rb +5 -5
  76. data/spec/helpers/bootstrap_viewport_meta_helper_spec.rb +4 -4
  77. data/spec/helpers/button_to_helper_spec.rb +19 -0
  78. data/spec/helpers/glyph_helper_spec.rb +1 -1
  79. data/spec/helpers/nav_helper_spec.rb +56 -0
  80. data/spec/helpers/twitter_breadcrumbs_helper_spec.rb +18 -10
  81. data/spec/spec_helper.rb +1 -1
  82. metadata +52 -27
  83. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  84. data/spec/dummy/db/schema.rb +0 -16
  85. data/spec/dummy/script/rails +0 -6
@@ -13,27 +13,27 @@
13
13
  <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js" type="text/javascript"></script>
14
14
  <![endif]-->
15
15
 
16
- <%%= stylesheet_link_tag "application", :media => "all" %>
16
+ <%%= stylesheet_link_tag "application", media: "all" %>
17
17
 
18
18
  <!-- For third-generation iPad with high-resolution Retina display: -->
19
19
  <!-- Size should be 144 x 144 pixels -->
20
- <%%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
20
+ <%%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '144x144' %>
21
21
 
22
22
  <!-- For iPhone with high-resolution Retina display: -->
23
23
  <!-- Size should be 114 x 114 pixels -->
24
- <%%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
24
+ <%%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '114x114' %>
25
25
 
26
26
  <!-- For first- and second-generation iPad: -->
27
27
  <!-- Size should be 72 x 72 pixels -->
28
- <%%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
28
+ <%%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '72x72' %>
29
29
 
30
30
  <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
31
31
  <!-- Size should be 57 x 57 pixels -->
32
- <%%= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
32
+ <%%= favicon_link_tag 'apple-touch-icon-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png' %>
33
33
 
34
34
  <!-- For all other devices -->
35
35
  <!-- Size should be 32 x 32 pixels -->
36
- <%%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
36
+ <%%= favicon_link_tag 'favicon.ico', rel: 'shortcut icon' %>
37
37
  <%%= javascript_include_tag "application" %>
38
38
  </head>
39
39
  <body>
@@ -10,12 +10,12 @@
10
10
  /[if lt IE 9]
11
11
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
12
12
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"
13
- = stylesheet_link_tag "application", :media => "all"
14
- = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
15
- = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
16
- = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
17
- = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
18
- = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
13
+ = stylesheet_link_tag "application", media: "all"
14
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '144x144'
15
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '114x114'
16
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '72x72'
17
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png'
18
+ = favicon_link_tag 'favicon.ico', rel: 'shortcut icon'
19
19
  = javascript_include_tag "application"
20
20
 
21
21
  %body
@@ -11,12 +11,12 @@ html lang="en"
11
11
  /[if lt IE 9]
12
12
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
13
13
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"
14
- = stylesheet_link_tag "application", :media => "all"
15
- = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
16
- = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
17
- = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
18
- = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
19
- = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
14
+ = stylesheet_link_tag "application", media: "all"
15
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '144x144'
16
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '114x114'
17
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '72x72'
18
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png'
19
+ = favicon_link_tag 'favicon.ico', rel: 'shortcut icon'
20
20
  = javascript_include_tag "application"
21
21
 
22
22
  body
@@ -1,14 +1,14 @@
1
1
  <h2>Sign in</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => 'form-horizontal' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
4
4
  <div class="control-group">
5
- <%= f.label :email, :class => 'control-label' %>
5
+ <%= f.label :email, class: 'control-label' %>
6
6
  <div class="controls">
7
7
  <%= f.email_field :email %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="control-group">
11
- <%= f.label :password, :class => 'control-label' %>
11
+ <%= f.label :password, class: 'control-label' %>
12
12
  <div class="controls">
13
13
  <%= f.password_field :password %>
14
14
  </div>
@@ -16,14 +16,14 @@
16
16
 
17
17
  <% if devise_mapping.rememberable? -%>
18
18
  <div class='control-group' >
19
- <%= f.label :remember_me, :class => 'control-label' %>
19
+ <%= f.label :remember_me, class: 'control-label' %>
20
20
  <%= f.check_box :remember_me %>
21
21
  </div>
22
22
  <% end -%>
23
23
 
24
24
  <div class="form-actions">
25
- <%= f.submit "Sign in", :class => 'btn' %>
25
+ <%= f.submit "Sign in", class: 'btn' %>
26
26
  </div>
27
27
  <% end %>
28
28
 
29
- <%= render :partial => "devise/shared/links" %>
29
+ <%= render partial: "devise/shared/links" %>
@@ -1,18 +1,18 @@
1
- <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
1
+ <%%= form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f| %>
2
2
  <%- columns.each do |column| -%>
3
3
  <div class="form-group">
4
- <%%= f.label :<%= column.name %>, :class => 'control-label col-md-2' %>
4
+ <%%= f.label :<%= column.name %>, class: 'control-label col-md-2' %>
5
5
  <div class="col-md-10">
6
- <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %> form-control' %>
6
+ <%%= f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control' %>
7
7
  </div>
8
8
  </div>
9
9
  <%- end -%>
10
10
 
11
11
  <div class="form-group">
12
12
  <div class='col-md-offset-2 col-md-10'>
13
- <%%= f.submit nil, :class => 'btn btn-primary' %>
14
- <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
15
- <%= controller_routing_path %>_path, :class => 'btn btn-default' %>
13
+ <%%= f.submit nil, class: 'btn btn-primary' %>
14
+ <%%= link_to t('.cancel', default: t("helpers.links.cancel")),
15
+ <%= controller_routing_path %>_path, class: 'btn btn-default' %>
16
16
  </div>
17
17
  </div>
18
18
  <%% end %>
@@ -1,11 +1,11 @@
1
- = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
1
+ = form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  .form-group
4
- = f.label :<%= column.name %>, :class => 'control-label col-md-2'
4
+ = f.label :<%= column.name %>, class: 'control-label col-md-2'
5
5
  .col-md-10
6
- = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %> form-control'
6
+ = f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control'
7
7
  <%- end -%>
8
8
  .form-group
9
9
  .col-md-offset-2.col-md-10
10
- = f.submit nil, :class => 'btn btn-primary'
11
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
@@ -1,11 +1,11 @@
1
- = form_for @<%= resource_name %>, :html => { :class => "form-horizontal" } do |f|
1
+ = form_for @<%= resource_name %>, html: { class: "form-horizontal" } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  .form-group
4
- = f.label :<%= column.name %>, :class => 'control-label col-md-2'
4
+ = f.label :<%= column.name %>, class: 'control-label col-md-2'
5
5
  .col-md-10
6
- = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %> form-control'
6
+ = f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control'
7
7
  <%- end -%>
8
8
  .form-group
9
9
  .col-md-offset-2.col-md-10
10
- = f.submit nil, :class => 'btn btn-primary'
11
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
@@ -1,5 +1,5 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize %></h1>
3
+ <h1><%%=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize %></h1>
4
4
  </div>
5
- <%%= render :partial => 'form' %>
5
+ <%%= render partial: 'form' %>
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- %h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ %h1=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  div class="page-header"
3
- h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ h1=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,6 +1,6 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => model_class.model_name.human.pluralize.titleize %></h1>
3
+ <h1><%%=t '.title', default: model_class.model_name.human.pluralize.titleize %></h1>
4
4
  </div>
5
5
  <table class="table table-striped">
6
6
  <thead>
@@ -10,7 +10,7 @@
10
10
  <th><%%= model_class.human_attribute_name(:<%= column.name %>) %></th>
11
11
  <%- end -%>
12
12
  <th><%%= model_class.human_attribute_name(:created_at) %></th>
13
- <th><%%=t '.actions', :default => t("helpers.actions") %></th>
13
+ <th><%%=t '.actions', default: t("helpers.actions") %></th>
14
14
  </tr>
15
15
  </thead>
16
16
  <tbody>
@@ -22,13 +22,13 @@
22
22
  <%- end -%>
23
23
  <td><%%=l <%= resource_name %>.created_at, format: :long %></td>
24
24
  <td>
25
- <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.show', :default => t('helpers.links.show')) }" do %>
25
+ <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do %>
26
26
  <%%= glyph 'info-sign' %>
27
27
  <%%- end -%>
28
- <%%= link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.edit', :default => t('helpers.links.edit')) }" do %>
28
+ <%%= link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do %>
29
29
  <%%= glyph 'pencil' %>
30
30
  <%%- end -%>
31
- <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs', :title => "#{ t('.destroy', :default => t('helpers.links.destroy')) }" do %>
31
+ <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do %>
32
32
  <%%= glyph 'remove' %>
33
33
  <%%- end -%>
34
34
  </td>
@@ -37,6 +37,6 @@
37
37
  </tbody>
38
38
  </table>
39
39
 
40
- <%%= link_to t('.new', :default => t("helpers.links.new")),
40
+ <%%= link_to t('.new', default: t("helpers.links.new")),
41
41
  new_<%= singular_controller_routing_path %>_path,
42
- :class => 'btn btn-primary' %>
42
+ class: 'btn btn-primary' %>
@@ -1,6 +1,6 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- %h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
3
+ %h1=t '.title', default: model_class.model_name.human.pluralize.titleize
4
4
  %table.table.table-striped
5
5
  %thead
6
6
  %tr
@@ -9,7 +9,7 @@
9
9
  %th= model_class.human_attribute_name(:<%= column.name %>)
10
10
  <%- end -%>
11
11
  %th= model_class.human_attribute_name(:created_at)
12
- %th=t '.actions', :default => t("helpers.actions")
12
+ %th=t '.actions', default: t("helpers.actions")
13
13
  %tbody
14
14
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
15
15
  %tr
@@ -19,11 +19,11 @@
19
19
  <%- end -%>
20
20
  %td=l <%= resource_name %>.created_at, format: :long
21
21
  %td
22
- = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.show', :default => t('helpers.links.show')) }" do
22
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do
23
23
  = glyph 'info-sign'
24
- = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.edit', :default => t('helpers.links.edit')) }" do
24
+ = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do
25
25
  = glyph 'pencil'
26
- = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs', :title => "#{ t('.destroy', :default => t('helpers.links.destroy')) }" do
26
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do
27
27
  = glyph 'remove'
28
28
 
29
- = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
29
+ = link_to t('.new', default: t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, class: 'btn btn-primary'
@@ -1,6 +1,6 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
3
+ h1=t '.title', default: model_class.model_name.human.pluralize.titleize
4
4
  table.table.table-striped
5
5
  thead
6
6
  tr
@@ -9,7 +9,7 @@ table.table.table-striped
9
9
  th= model_class.human_attribute_name(:<%= column.name %>)
10
10
  <%- end -%>
11
11
  th= model_class.human_attribute_name(:created_at)
12
- th=t '.actions', :default => t("helpers.actions")
12
+ th=t '.actions', default: t("helpers.actions")
13
13
  tbody
14
14
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
15
15
  tr
@@ -19,11 +19,11 @@ table.table.table-striped
19
19
  <%- end -%>
20
20
  td=l <%= resource_name %>.created_at, format: :long
21
21
  td
22
- = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.show', :default => t('helpers.links.show')) }" do
22
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do
23
23
  = glyph 'info-sign'
24
- = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-xs', :title => "#{ t('.edit', :default => t('helpers.links.edit')) }" do
24
+ = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do
25
25
  = glyph 'pencil'
26
- = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs', :title => "#{ t('.destroy', :default => t('helpers.links.destroy')) }" do
26
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do
27
27
  = glyph 'remove'
28
28
 
29
- = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
29
+ = link_to t('.new', default: t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, class: 'btn btn-primary'
@@ -1,5 +1,5 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize %></h1>
3
+ <h1><%%=t '.title', default: [:'helpers.titles.new', 'New %{model}'], model: model_class.model_name.human.titleize %></h1>
4
4
  </div>
5
- <%%= render :partial => 'form' %>
5
+ <%%= render partial: 'form' %>
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- %h1=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ %h1=t '.title', default: [:'helpers.titles.new', 'New %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- h1=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ h1=t '.title', default: [:'helpers.titles.new', 'New %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,6 +1,6 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => model_class.model_name.human.titleize %></h1>
3
+ <h1><%%=t '.title', default: model_class.model_name.human.titleize %></h1>
4
4
  </div>
5
5
 
6
6
  <div class="fieldset">
@@ -13,13 +13,13 @@
13
13
  </div>
14
14
 
15
15
  <div class="form-group">
16
- <%%= link_to t('.back', :default => t("helpers.links.back")),
17
- <%= controller_routing_path %>_path, :class => 'btn btn-default' %>
18
- <%%= link_to t('.edit', :default => t("helpers.links.edit")),
19
- edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default' %>
20
- <%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
16
+ <%%= link_to t('.back', default: t("helpers.links.back")),
17
+ <%= controller_routing_path %>_path, class: 'btn btn-default' %>
18
+ <%%= link_to t('.edit', default: t("helpers.links.edit")),
19
+ edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), class: 'btn btn-default' %>
20
+ <%%= link_to t('.destroy', default: t("helpers.links.destroy")),
21
21
  <%= singular_controller_routing_path %>_path(@<%= resource_name %>),
22
- :method => 'delete',
23
- :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
24
- :class => 'btn btn-danger' %>
22
+ method: 'delete',
23
+ data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) },
24
+ class: 'btn btn-danger' %>
25
25
  </div>
@@ -1,16 +1,15 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
3
- h1=t '.title', :default => model_class.model_name.human.titleize
4
-
2
+ .page-header
3
+ %h1=t '.title', default: model_class.model_name.human.titleize
5
4
  .fieldset
6
- dl
5
+ %dl
7
6
  <%- columns.each do |column| -%>
8
- dt.label.label-default= model_class.human_attribute_name(:<%= column.name %>)
9
- dd
10
- pre.prettyprint= @<%= resource_name %>.<%= column.name %>
7
+ %dt.label.label-default= model_class.human_attribute_name(:<%= column.name %>)
8
+ %dd
9
+ %pre.prettyprint= @<%= resource_name %>.<%= column.name %>
11
10
  <%- end -%>
12
11
 
13
12
  .form-group
14
- = link_to t('.back', :default => t("helpers.links.back")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
15
- = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default'
16
- = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-danger'
13
+ = link_to t('.back', default: t("helpers.links.back")), <%= controller_routing_path %>_path, class: 'btn btn-default'
14
+ = link_to t('.edit', default: t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), class: 'btn btn-default'
15
+ = link_to t('.destroy', default: t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), method: "delete", data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-danger'
@@ -1,6 +1,6 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  div class="page-header"
3
- h1=t '.title', :default => model_class.model_name.human.titleize
3
+ h1=t '.title', default: model_class.model_name.human.titleize
4
4
 
5
5
  .fieldset
6
6
  dl
@@ -11,8 +11,8 @@ div class="page-header"
11
11
  <%- end -%>
12
12
 
13
13
  .form-group
14
- = link_to t('.back', :default => t("helpers.links.back")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
14
+ = link_to t('.back', default: t("helpers.links.back")), <%= controller_routing_path %>_path, class: 'btn btn-default'
15
15
  '
16
- = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default'
16
+ = link_to t('.edit', default: t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), class: 'btn btn-default'
17
17
  '
18
- = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-danger'
18
+ = link_to t('.destroy', default: t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(@<%= resource_name %>), method: "delete", data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-danger'
@@ -1,15 +1,15 @@
1
- <%%= simple_form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f| %>
1
+ <%%= simple_form_for @<%= resource_name %>, html: { class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f| %>
2
2
  <%- columns.each do |column| -%>
3
3
  <%%= f.input :<%= column.name %> %>
4
4
  <%- end -%>
5
5
  <%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
6
- <%%= f.button :wrapped, :cancel => <%= controller_routing_path %>_path %>
6
+ <%%= f.button :wrapped, cancel: <%= controller_routing_path %>_path %>
7
7
  <%- else -%>
8
8
  <div class="form-group">
9
9
  <div class='col-sm-offset-3 col-sm-9'>
10
- <%%= f.button :submit, :class => 'btn-primary' %>
11
- <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
12
- <%= controller_routing_path %>_path, :class => 'btn btn-default' %>
10
+ <%%= f.button :submit, class: 'btn-primary' %>
11
+ <%%= link_to t('.cancel', default: t("helpers.links.cancel")),
12
+ <%= controller_routing_path %>_path, class: 'btn btn-default' %>
13
13
  </div>
14
14
  </div>
15
15
  <%- end -%>
@@ -1,12 +1,12 @@
1
- = simple_form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f|
1
+ = simple_form_for @<%= resource_name %>, html: { class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  = f.input :<%= column.name %>
4
4
  <%- end -%>
5
5
  <%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
6
- = f.button :wrapped, :cancel => <%= controller_routing_path %>_path
6
+ = f.button :wrapped, cancel: <%= controller_routing_path %>_path
7
7
  <%- else -%>
8
8
  .form-group
9
9
  .col-sm-offset-3.col-sm-9
10
- = f.submit nil, :class => 'btn btn-primary'
11
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
12
12
  <%- end -%>
@@ -1,12 +1,12 @@
1
- = simple_form_for @<%= resource_name %>, :html => { :class => "form-horizontal" }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f|
1
+ = simple_form_for @<%= resource_name %>, html: { class: "form-horizontal" }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } do |f|
2
2
  <%- columns.each do |column| -%>
3
3
  = f.input :<%= column.name %>
4
4
  <%- end -%>
5
5
  <%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
6
- = f.button :wrapped, :cancel => <%= controller_routing_path %>_path
6
+ = f.button :wrapped, cancel: <%= controller_routing_path %>_path
7
7
  <%- else -%>
8
8
  .form-group
9
9
  .col-sm-offset-3.col-sm-9
10
- = f.submit nil, :class => 'btn btn-primary'
11
- = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
12
12
  <%- end -%>