scaffold_plus 1.4.0 → 1.4.1

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: c5b490cd1736e29f658be2225acfb7acf13d583d
4
- data.tar.gz: 65a025ea73ecce6f5a7ec16b745ed5a903d8e694
3
+ metadata.gz: c4aab6e083182126fb602ed441d287d0c41acedb
4
+ data.tar.gz: 839075341d53fcd54653600148f5b3a30c4de7eb
5
5
  SHA512:
6
- metadata.gz: 1d45b528fc3807500c43485658ed1510bc97daef86d980fdf6d7af2d8604306d80867ccbd3dc80338afa70a2680b034e25f341e4f50be949a5e5fc1345fe0f0b
7
- data.tar.gz: 73f83b76bacaf97b7248a5056735d928b8633ebae1649171ebc60cfe81a8a5924b7afef2e58d75a909288c2bd8a19f06d7e7d385c30db83f033fa26eb55d5e46
6
+ metadata.gz: f26d80e516a8d9299e94dabd2802c8c8891176fb02295e73af0445ea7eb393c01997108f46f53e7dfc2a2eb78e5d4d2eb53bf61d7bee0eaf294c22b123c97b45
7
+ data.tar.gz: b30579ce6a93d3631892273291af6e6f6a6c36d724255e4ecd6970c682caf8c33d8db2f13dfe49198943634beb790063b2269841ca6e212e6a1668d3bc567636
@@ -0,0 +1,18 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module ScaffoldPlus
4
+ module Generators
5
+ class AutofocusGenerator < ActiveRecord::Generators::Base
6
+ desc "Add autofocus to view"
7
+ argument :name, type: :string,
8
+ desc: "The object to be updated"
9
+ argument :column, type: :string,
10
+ desc: 'The column name to be focused'
11
+
12
+ def add_to_view
13
+ file = "app/views/#{table_name}/_form.html.erb"
14
+ gsub_file file, /(:#{column}) %>/, "\\1, autofocus: true %>"
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module ScaffoldPlus
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffold_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -81,6 +81,7 @@ files:
81
81
  - Rakefile
82
82
  - lib/generators/scaffold_plus/ancestry/ancestry_generator.rb
83
83
  - lib/generators/scaffold_plus/ancestry/templates/ancestry_migration.rb
84
+ - lib/generators/scaffold_plus/autofocus/autofocus_generator.rb
84
85
  - lib/generators/scaffold_plus/collection/collection_generator.rb
85
86
  - lib/generators/scaffold_plus/collection/templates/view.html.erb
86
87
  - lib/generators/scaffold_plus/habtm/habtm_generator.rb
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project:
118
- rubygems_version: 2.3.0
119
+ rubygems_version: 2.4.1
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: A collection of little helpers for Rails scaffolding