spiral_form 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: 2050a97c96ea61b738daf11c3ff35616ae8af27b9cbc3e0e5a5efb279c26248e
4
- data.tar.gz: 7b6199366ec6bdf6cfca89bd01abfe9b70c91fa0c0c5f254815c08bac63c71db
3
+ metadata.gz: ac41eb9561c05e3025429a2b02f6ed01c8f25be6981e8afa1028959d7311ec71
4
+ data.tar.gz: 0ce1cbb7914ea2d4ba70abdc51866a7d20e51593be19896d6d4d7f8a208afb23
5
5
  SHA512:
6
- metadata.gz: 3a1caffa7a8ee48de73d89d17233f73be8c53dc9f7db0662d00cd2242f3c3b15392666893f7e7508ad9c537b1b3883273209bacd9b8e17a3a9eeea9ef64464f2
7
- data.tar.gz: f918951f265824785480acb72e75b1c98ecb2bd778e52ad85dc863524e6935c69a7b0132094cfb70c0df102c234f93ebcd051f1382755835df3649ff3b340899
6
+ metadata.gz: 0a937015c1d28dc6cefe68feb714df888ee2d5615f97ef12c44b0acf426439c1edc5488b3b76975325dcf5369ddafa315898a3bad9695284d4f25e4099437515
7
+ data.tar.gz: cd7096571ad6c85b59aa1c40363e5a1241c7fe8603edc61a98ca7090470eda264ec44692e1e069df9366ce8bda9118e76f42f44cf955d63936d7824d258451de
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SpiralForm
1
+ # SakuraRails
2
2
  Short description and motivation.
3
3
 
4
4
  ## Usage
@@ -13,7 +13,7 @@ gem 'spiral_form'
13
13
 
14
14
  And then execute:
15
15
  ```bash
16
- $ bundle
16
+ $ bundle install
17
17
  ```
18
18
 
19
19
  Or install it yourself as:
@@ -21,6 +21,23 @@ Or install it yourself as:
21
21
  $ gem install spiral_form
22
22
  ```
23
23
 
24
+ app/assets/stylesheets/application.scss
25
+
26
+ ```scss
27
+ @import 'spiral_form';
28
+ ```
29
+
30
+ app/assets/javascripts/application.js
31
+
32
+ ```js
33
+ //=require spiral_form
34
+ ```
35
+
36
+ view_file
37
+ ```erb
38
+ <%= spiral_form %>
39
+ ```
40
+
24
41
  ## Contributing
25
42
  Contribution directions go here.
26
43
 
@@ -1,6 +1,13 @@
1
+
2
+ require 'spiral_form/helper'
1
3
  module SpiralForm
2
4
  class Engine < ::Rails::Engine
3
-
5
+ isolate_namespace SpiralForm
6
+ initializer 'spiral_form.action_controller_helpers' do
7
+ ActiveSupport.on_load :action_controller do
8
+ include SpiralForm::Helper
9
+ end
10
+ end
4
11
  end
5
12
  end
6
13
 
@@ -0,0 +1,27 @@
1
+ # module SpiralForm
2
+ # module Helper
3
+ # def logi(parent,children, grand_children)
4
+ # parent_name = parent.classify
5
+ # children_name = children.classify
6
+ # grandchildren_name = grand_children.classify
7
+ # parent = parent_name.new(name: params[:parent][:name])
8
+ # parent.save
9
+
10
+ # children_id = children + "_id"
11
+ # grand_children_id = grand_children + "_id"
12
+ # # binding.pry
13
+ # if params[:parent][:children]
14
+ # params[:parent][:children].each_with_index do |disc, index|
15
+ # discEntity = children_name.create(name: params[:parent][:children][index][:name], children_id: parent.id)
16
+ # if params[:parent][:children][index][:grand_children]
17
+ # params[:parent][:children][index][:grand_children].each_with_index do |song, i|
18
+ # songEntity = grandchildren_name.create(name: params[:parent][:children][index][:grand_children][i][:name], grand_children_id: discEntity.id)
19
+ # end
20
+ # end
21
+ # end
22
+ # end
23
+
24
+ # redirect_to item_path(item)
25
+ # end
26
+ # end
27
+ # end
@@ -1,3 +1,3 @@
1
1
  module SpiralForm
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,7 +1,9 @@
1
1
  module SpiralForm
2
2
  module ViewHelper
3
- def spiral_form
4
- content_tag(:div, "", id: "spiral")
3
+ def spiral_form(token)
4
+ content_tag(:form, "", id: "spiral") do
5
+ concat content_tag(:input,"", name: "authenticity_token", type: "hidden", value: token)
6
+ end
5
7
  end
6
8
  end
7
9
  end
@@ -1,14 +1,11 @@
1
1
  //= require ./sub
2
2
  window.onload = () => {
3
- let spiral = document.getElementById("spiral")
4
- let formField = document.createElement("form")
5
- formField.id = "formField"
3
+ let formField = document.getElementById("spiral")
6
4
  formField.action = "/items"
7
5
  formField.method = "post"
8
6
  formField.className = "container"
9
7
  let label = document.createElement("label")
10
8
  label.innerHTML = "商品名"
11
- spiral.appendChild(formField)
12
9
  formField.appendChild(label)
13
10
  let input = document.createElement("input")
14
11
  input.name = "item[name]"
@@ -25,11 +22,6 @@ window.onload = () => {
25
22
  submit.innerHTML = "保存する"
26
23
  submit.className = "btn btn-sm btn-success"
27
24
  formField.appendChild(submit)
28
- let token = document.createElement("input")
29
- token.type ="hidden"
30
- token.name = "authenticity_token"
31
- token.value = "<%= form_authenticity_token %>"
32
- formField.appendChild(token)
33
25
 
34
26
 
35
27
  //Vue.jsで書きたい。。。
@@ -1,5 +1,5 @@
1
1
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/nio4r-2.4.0/ext/nio4r
2
- /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-79762-rqhfvr.rb extconf.rb
2
+ /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-92006-1wptkod.rb extconf.rb
3
3
  checking for unistd.h... yes
4
4
  checking for sys/select.h... yes
5
5
  checking for port_event_t in poll.h... no
@@ -247,4 +247,4 @@ linking shared-object nio4r_ext.bundle
247
247
 
248
248
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/nio4r-2.4.0/ext/nio4r
249
249
  make "DESTDIR=" install
250
- /usr/bin/install -c -m 0755 nio4r_ext.bundle ./.gem.20190813-79762-bl0d77
250
+ /usr/bin/install -c -m 0755 nio4r_ext.bundle ./.gem.20190813-92006-1xmbob9
@@ -1,5 +1,5 @@
1
1
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/nokogiri-1.10.4/ext/nokogiri
2
- /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-79762-g7ldfd.rb extconf.rb
2
+ /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-92006-nagy9d.rb extconf.rb
3
3
  checking if the C compiler accepts -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... yes
4
4
  checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
5
5
  Building nokogiri using packaged libraries.
@@ -131,4 +131,4 @@ rm -rf /Users/satoshi/spiral_form/vendor/bundle/gems/nokogiri-1.10.4/ports
131
131
 
132
132
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/nokogiri-1.10.4/ext/nokogiri
133
133
  make "DESTDIR=" install
134
- /usr/bin/install -c -m 0755 nokogiri.bundle ./.gem.20190813-79762-1raf860/nokogiri
134
+ /usr/bin/install -c -m 0755 nokogiri.bundle ./.gem.20190813-92006-1xiklqv/nokogiri
@@ -67,9 +67,9 @@ have_iconv?: checking for iconv... -------------------- yes
67
67
  "clang -o conftest -I/Users/satoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/x86_64-darwin18 -I/Users/satoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/backward -I/Users/satoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0 -I. -I/Users/satoshi/.rbenv/versions/2.5.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -pipe -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 conftest.c -L. -L/Users/satoshi/.rbenv/versions/2.5.1/lib -L. -L/Users/satoshi/.rbenv/versions/2.5.1/lib -fstack-protector -L/usr/local/lib -lruby.2.5.1-static -framework Foundation -lpthread -ldl -lobjc "
68
68
  Undefined symbols for architecture x86_64:
69
69
  "_iconv", referenced from:
70
- _main in conftest-f7bc2a.o
70
+ _main in conftest-1f3353.o
71
71
  "_iconv_open", referenced from:
72
- _main in conftest-f7bc2a.o
72
+ _main in conftest-1f3353.o
73
73
  ld: symbol(s) not found for architecture x86_64
74
74
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
75
75
  checked program was:
@@ -1,5 +1,5 @@
1
1
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/websocket-driver-0.7.1/ext/websocket-driver
2
- /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-79762-1e7027l.rb extconf.rb
2
+ /Users/satoshi/.rbenv/versions/2.5.1/bin/ruby -I /Users/satoshi/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190813-92006-k26ici.rb extconf.rb
3
3
  creating Makefile
4
4
 
5
5
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/websocket-driver-0.7.1/ext/websocket-driver
@@ -12,4 +12,4 @@ linking shared-object websocket_mask.bundle
12
12
 
13
13
  current directory: /Users/satoshi/spiral_form/vendor/bundle/gems/websocket-driver-0.7.1/ext/websocket-driver
14
14
  make "DESTDIR=" install
15
- /usr/bin/install -c -m 0755 websocket_mask.bundle ./.gem.20190813-79762-brf0on
15
+ /usr/bin/install -c -m 0755 websocket_mask.bundle ./.gem.20190813-92006-127jp1v
@@ -31,8 +31,8 @@ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
31
  vendorarchdir = $(vendorlibdir)/$(sitearch)
32
32
  vendorlibdir = $(vendordir)/$(ruby_version)
33
33
  vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(DESTDIR)./.gem.20190813-79762-bl0d77
35
- sitelibdir = $(DESTDIR)./.gem.20190813-79762-bl0d77
34
+ sitearchdir = $(DESTDIR)./.gem.20190813-92006-1xmbob9
35
+ sitelibdir = $(DESTDIR)./.gem.20190813-92006-1xmbob9
36
36
  sitedir = $(rubylibprefix)/site_ruby
37
37
  rubyarchdir = $(rubylibdir)/$(arch)
38
38
  rubylibdir = $(rubylibprefix)/$(ruby_version)
@@ -31,8 +31,8 @@ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
31
  vendorarchdir = $(vendorlibdir)/$(sitearch)
32
32
  vendorlibdir = $(vendordir)/$(ruby_version)
33
33
  vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(DESTDIR)./.gem.20190813-79762-1raf860
35
- sitelibdir = $(DESTDIR)./.gem.20190813-79762-1raf860
34
+ sitearchdir = $(DESTDIR)./.gem.20190813-92006-1xiklqv
35
+ sitelibdir = $(DESTDIR)./.gem.20190813-92006-1xiklqv
36
36
  sitedir = $(rubylibprefix)/site_ruby
37
37
  rubyarchdir = $(rubylibdir)/$(arch)
38
38
  rubylibdir = $(rubylibprefix)/$(ruby_version)
@@ -31,8 +31,8 @@ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
31
  vendorarchdir = $(vendorlibdir)/$(sitearch)
32
32
  vendorlibdir = $(vendordir)/$(ruby_version)
33
33
  vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(DESTDIR)./.gem.20190813-79762-brf0on
35
- sitelibdir = $(DESTDIR)./.gem.20190813-79762-brf0on
34
+ sitearchdir = $(DESTDIR)./.gem.20190813-92006-127jp1v
35
+ sitelibdir = $(DESTDIR)./.gem.20190813-92006-127jp1v
36
36
  sitedir = $(rubylibprefix)/site_ruby
37
37
  rubyarchdir = $(rubylibdir)/$(arch)
38
38
  rubylibdir = $(rubylibprefix)/$(ruby_version)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spiral_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - saongtx7
@@ -37,6 +37,7 @@ files:
37
37
  - Rakefile
38
38
  - lib/spiral_form.rb
39
39
  - lib/spiral_form/engine.rb
40
+ - lib/spiral_form/helper.rb
40
41
  - lib/spiral_form/railtie.rb
41
42
  - lib/spiral_form/version.rb
42
43
  - lib/spiral_form/view_helper.rb