effective_developer 0.6.14 → 0.6.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/effective_developer/version.rb +1 -1
  3. data/lib/generators/effective/controller_generator.rb +6 -1
  4. data/lib/generators/effective/datatable_generator.rb +8 -1
  5. data/lib/generators/effective/form_generator.rb +10 -13
  6. data/lib/generators/effective/helpers.rb +30 -0
  7. data/lib/generators/effective/model_generator.rb +2 -2
  8. data/lib/generators/effective/views_generator.rb +10 -1
  9. data/lib/scaffolds/admin_effective/controllers/controller.rb +15 -0
  10. data/lib/scaffolds/admin_effective/datatables/datatable.rb +30 -0
  11. data/lib/scaffolds/{importers → admin_effective/importers}/csv_importer.rb +0 -0
  12. data/lib/scaffolds/{models → admin_effective/models}/model.rb +0 -0
  13. data/lib/scaffolds/admin_effective/views/_form.html.haml +15 -0
  14. data/lib/scaffolds/admin_effective/views/_form_resource.html.haml +13 -0
  15. data/lib/scaffolds/admin_effective/views/_resource.html.haml +1 -0
  16. data/lib/scaffolds/{controllers → basic/controllers}/controller.rb +0 -0
  17. data/lib/scaffolds/{datatables → basic/datatables}/datatable.rb +0 -0
  18. data/lib/scaffolds/basic/importers/csv_importer.rb +14 -0
  19. data/lib/scaffolds/basic/models/model.rb +30 -0
  20. data/lib/scaffolds/basic/views/_form.html.haml +15 -0
  21. data/lib/scaffolds/{forms/tabbed → basic/views}/_form_resource.html.haml +0 -0
  22. data/lib/scaffolds/{views → basic/views}/_resource.html.haml +0 -0
  23. data/lib/scaffolds/effective/controllers/controller.rb +15 -0
  24. data/lib/scaffolds/effective/datatables/datatable.rb +28 -0
  25. data/lib/scaffolds/effective/importers/csv_importer.rb +14 -0
  26. data/lib/scaffolds/effective/models/model.rb +30 -0
  27. data/lib/scaffolds/{forms/tabbed → effective/views}/_form.html.haml +0 -0
  28. data/lib/scaffolds/effective/views/_form_resource.html.haml +13 -0
  29. data/lib/scaffolds/effective/views/_layout.html.haml +2 -0
  30. data/lib/scaffolds/effective/views/_resource.html.haml +13 -0
  31. data/lib/scaffolds/{forms/fields → fields}/_field_belongs_to.html.haml +0 -0
  32. data/lib/scaffolds/{forms/fields → fields}/_field_boolean.html.haml +0 -0
  33. data/lib/scaffolds/{forms/fields → fields}/_field_date.html.haml +0 -0
  34. data/lib/scaffolds/{forms/fields → fields}/_field_datetime.html.haml +0 -0
  35. data/lib/scaffolds/{forms/fields → fields}/_field_decimal.html.haml +0 -0
  36. data/lib/scaffolds/{forms/fields → fields}/_field_email.html.haml +0 -0
  37. data/lib/scaffolds/{forms/fields → fields}/_field_float.html.haml +0 -0
  38. data/lib/scaffolds/{forms/fields → fields}/_field_hstore.html.haml +0 -0
  39. data/lib/scaffolds/{forms/fields → fields}/_field_inet.html.haml +0 -0
  40. data/lib/scaffolds/{forms/fields → fields}/_field_integer.html.haml +0 -0
  41. data/lib/scaffolds/{forms/fields → fields}/_field_nested_resource.html.haml +0 -0
  42. data/lib/scaffolds/{forms/fields → fields}/_field_phone.html.haml +0 -0
  43. data/lib/scaffolds/{forms/fields → fields}/_field_price.html.haml +0 -0
  44. data/lib/scaffolds/{forms/fields → fields}/_field_select.html.haml +0 -0
  45. data/lib/scaffolds/{forms/fields → fields}/_field_select_constant.html.haml +0 -0
  46. data/lib/scaffolds/{forms/fields → fields}/_field_string.html.haml +0 -0
  47. data/lib/scaffolds/{forms/fields → fields}/_field_text.html.haml +0 -0
  48. data/lib/scaffolds/{forms/fields → fields}/_nested_resource_fields.html.haml +0 -0
  49. metadata +42 -28
  50. data/lib/scaffolds/forms/flat/_form.html.haml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbd086f75e05dc03da801c3bf6bcb86b258f991abde5d978a3abb3d4da58a7c2
4
- data.tar.gz: ca825d18e1e8a26aa322a7568077b289621740433f086d6ae8884c39c2878108
3
+ metadata.gz: bb9fc81f4fa250e8837722612ae2c349b863b57fb07e01e6f05bfddd4845a6f6
4
+ data.tar.gz: 8c41521fa64be2d74b8179628c84d9071c7610b0ab64646d2916eb29794711af
5
5
  SHA512:
6
- metadata.gz: fd6047921324421646b30036becf8121edeaa65131d16099396a73e24ae21cac26ad9e22804ec01b589a9cd481a4c58ee7a4e8c6de73d5525ea8afd7ad4bc59c
7
- data.tar.gz: 7d878b2634da808b13f00fcd7d857ee0b649481108f0eb1104cc99ce04079d92a5483e879a623259d4791ed713356485d25fb1442fe7a8be0384381e4284dcd4
6
+ metadata.gz: 50c82d38e666ecb1c6b4237e543a7c27471cbfc828f049deb09563141d99014a84384a0803901b777e8e27e5a27ffe7a8d69c102b0390c373e7b4d5409890d4e
7
+ data.tar.gz: a072c91f4c049b98763f426380eee988496c829796f2e1ed6e5937de9b2019f414fa07f4076349fd6f7e392d9b74f120788c5fe0a5a6b5b6fea8ae41af8e1d58
@@ -1,3 +1,3 @@
1
1
  module EffectiveDeveloper
2
- VERSION = '0.6.14'.freeze
2
+ VERSION = '0.6.15'.freeze
3
3
  end
@@ -35,7 +35,12 @@ module Effective
35
35
  end
36
36
 
37
37
  def create_controller
38
- template 'controllers/controller.rb', resource.controller_file
38
+ if admin_effective_scaffold?
39
+ template "#{scaffold_path}/controllers/controller.rb", resource.admin_effective_controller_file
40
+ else
41
+ template "#{scaffold_path}/controllers/controller.rb", resource.controller_file
42
+ end
43
+
39
44
  end
40
45
 
41
46
  end
@@ -37,7 +37,14 @@ module Effective
37
37
  end
38
38
 
39
39
  with_resource_tenant do
40
- template 'datatables/datatable.rb', resource.datatable_file
40
+ if admin_effective_scaffold?
41
+ template "#{scaffold_path}/datatables/datatable.rb", resource.admin_effective_datatable_file
42
+ elsif effective_scaffold?
43
+ template "#{scaffold_path}/datatables/datatable.rb", resource.effective_datatable_file
44
+ else
45
+ template "#{scaffold_path}/datatables/datatable.rb", resource.datatable_file
46
+ end
47
+
41
48
  end
42
49
 
43
50
  end
@@ -18,7 +18,6 @@ module Effective
18
18
  desc 'Creates a _form.html.haml in your app/views/model/ folder.'
19
19
 
20
20
  argument :attributes, type: :array, default: [], banner: 'field[:type] field[:type]'
21
- class_option :tabbed, type: :string, default: 'true'
22
21
 
23
22
  def validate_resource
24
23
  exit unless resource_valid?
@@ -33,20 +32,18 @@ module Effective
33
32
  say_status :invoke, :form, :white
34
33
  end
35
34
 
36
- def create_flat_form
35
+ def create_form
37
36
  with_resource_tenant do
38
- if options[:tabbed] == 'false'
39
- template 'forms/flat/_form.html.haml', resource.view_file('form', partial: true)
37
+ if admin_effective_scaffold?
38
+ template "#{scaffold_path}/views/_form.html.haml", resource.admin_effective_view_file('form', partial: true)
39
+ template "#{scaffold_path}/views/_form_resource.html.haml", resource.admin_effective_view_file("form_#{resource.name}", partial: true)
40
+ elsif effective_scaffold?
41
+ template "#{scaffold_path}/views/_form_resource.html.haml", resource.view_file("form", partial: true)
42
+ else
43
+ template "#{scaffold_path}/views/_form.html.haml", resource.view_file('form', partial: true)
44
+ template "#{scaffold_path}/views/_form_resource.html.haml", resource.view_file("form_#{resource.name}", partial: true)
40
45
  end
41
- end
42
- end
43
46
 
44
- def create_tabbed_form
45
- with_resource_tenant do
46
- if options[:tabbed] == 'true'
47
- template 'forms/tabbed/_form.html.haml', resource.view_file('form', partial: true)
48
- template 'forms/tabbed/_form_resource.html.haml', resource.view_file("form_#{resource.name}", partial: true)
49
- end
50
47
  end
51
48
  end
52
49
 
@@ -103,7 +100,7 @@ module Effective
103
100
  end
104
101
 
105
102
  html = ERB.new(
106
- File.read("#{File.dirname(__FILE__)}/../../scaffolds/forms/fields/_field_#{partial}.html.haml")
103
+ File.read("#{File.dirname(__FILE__)}/../../scaffolds/fields/_field_#{partial}.html.haml")
107
104
  ).result(b).split("\n").map { |line| (' ' * depth) + line }
108
105
 
109
106
  html.length > 1 ? (html.join("\n") + "\n") : html.join
@@ -4,6 +4,36 @@ module Effective
4
4
 
5
5
  protected
6
6
 
7
+ # Based on the resource, effective or basic
8
+ def scaffold_path
9
+ return 'admin_effective' if admin_effective_scaffold?
10
+ return 'effective' if effective_scaffold?
11
+ 'basic'
12
+ end
13
+
14
+ def admin_scaffold?
15
+ Array(resource.namespaces).include?('admin')
16
+ end
17
+
18
+ def admin_effective_scaffold?
19
+ admin_scaffold? && effective_scaffold?
20
+ end
21
+
22
+ def basic_scaffold?
23
+ resource.klass.name.start_with?('Effective::') == false
24
+ end
25
+
26
+ def effective_scaffold?
27
+ resource.klass.name.start_with?('Effective::')
28
+ end
29
+
30
+ # Returns effective_messaging if run from that directory to scaffold
31
+ def effective_gem_name
32
+ path = Dir.pwd.split('/').last.to_s
33
+ raise('effective gem name not supported') unless path.start_with?('effective_')
34
+ path
35
+ end
36
+
7
37
  # This is kind of a validate for the resource
8
38
  def resource_valid?
9
39
  if resource.klass.blank?
@@ -20,13 +20,13 @@ module Effective
20
20
  end
21
21
 
22
22
  def create_model
23
- template 'models/model.rb', resource.model_file
23
+ template "#{scaffold_path}/models/model.rb", resource.model_file
24
24
  end
25
25
 
26
26
  protected
27
27
 
28
28
  def parent_class_name
29
- options[:parent] || (Rails::VERSION::MAJOR > 4 ? 'ApplicationRecord' : 'ActiveRecord::Base')
29
+ options[:parent] || 'ApplicationRecord'
30
30
  end
31
31
 
32
32
  def to_s_attribute
@@ -31,8 +31,17 @@ module Effective
31
31
 
32
32
  def create_views
33
33
  if invoked_actions.include?('show') || non_crud_actions.present?
34
- template 'views/_resource.html.haml', resource.view_file(resource.name, partial: true)
34
+ if admin_effective_scaffold?
35
+ template "#{scaffold_path}/views/_resource.html.haml", resource.admin_effective_view_file(resource.name, partial: true)
36
+ else
37
+ template "#{scaffold_path}/views/_resource.html.haml", resource.view_file(resource.name, partial: true)
38
+ end
35
39
  end
40
+
41
+ if effective_scaffold?
42
+ template "#{scaffold_path}/views/_layout.html.haml", resource.view_file('layout', partial: true)
43
+ end
44
+
36
45
  end
37
46
 
38
47
  end
@@ -0,0 +1,15 @@
1
+ module Admin
2
+ class <%= resource.class_name.sub('Effective::', '') %>Controller < ApplicationController
3
+ before_action(:authenticate_user!) if defined?(Devise)
4
+ before_action { EffectiveResources.authorize!(self, :admin, :<%= effective_gem_name %>) }
5
+
6
+ include Effective::CrudController
7
+
8
+ private
9
+
10
+ def permitted_params
11
+ params.require(:<%= resource.resource_name %>).permit!
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ module Admin
2
+ class Effective<%= resource.class_name.sub('Effective::', '') %>sDatatable < Effective::Datatable
3
+ datatable do
4
+ order :updated_at
5
+
6
+ col :updated_at, visible: false
7
+ col :created_at, visible: false
8
+ col :id, visible: false
9
+
10
+ <% if resource.belong_tos.present? || resource.has_anys.present? -%>
11
+ <% resource.belong_tos.each do |reference| -%>
12
+ col :<%= reference.name %>
13
+ <% end -%>
14
+ <% resource.has_anys.each do |reference| -%>
15
+ col :<%= reference.name %>
16
+ <% end -%>
17
+
18
+ <% end -%>
19
+ <% attributes.except(:created_at, :updated_at, :id).each do |name, _| -%>
20
+ col :<%= name %>
21
+ <% end -%>
22
+
23
+ actions_col
24
+ end
25
+
26
+ collection do
27
+ <%= resource.class_name %>.deep.all
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,15 @@
1
+ = tabs do
2
+ = tab '<%= resource.human_name.titleize %>' do
3
+ = render '<%= resource.view_file_path("form_#{resource.name}").sub('effective/', '') %>', <%= resource.name %>: <%= resource.name %>
4
+
5
+ <%- if resource.nested_resources.present? || resource.instance.respond_to?(:log_changes_datatable) %>
6
+ - if <%= resource.name %>.persisted?
7
+ <%- resource.nested_resources.each do |nested_resource| -%>
8
+ = tab '<%= nested_resource.plural_name.titleize %>' do
9
+ = render_datatable(<%= nested_resource.klass.name %>Datatable.new(<%= resource.name %>_id: <%= resource.name %>.id))
10
+
11
+ <%- end -%>
12
+ <% end -%>
13
+ - if <%= resource.name %>.persisted? && <%= resource.name %>.respond_to?(:log_changes_datatable)
14
+ = tab 'Logs' do
15
+ = render_datatable(<%= resource.name %>.log_changes_datatable)
@@ -0,0 +1,13 @@
1
+ <% if resource.namespace.present? -%>
2
+ = effective_form_with(model: [:<%= resource.namespace %>, <%= resource.name %>], engine: true) do |f|
3
+ <% else -%>
4
+ = effective_form_with(model: <%= resource.name %>, engine: true) do |f|
5
+ <% end -%>
6
+ <% resource.belong_tos.each do |reference| -%>
7
+ <%= render_field(reference, depth: 1) %>
8
+ <% end -%>
9
+ <% attributes.each do |attribute| -%>
10
+ <%= render_field(attribute, depth: 1) %>
11
+ <% end -%>
12
+
13
+ = effective_submit(f)
@@ -0,0 +1 @@
1
+ = render 'effective/<%= resource.plural_name %>/<%= resource.name %>', <%= resource.name %>: <%= resource.name %>, admin: true
@@ -0,0 +1,14 @@
1
+ module CsvImporters
2
+ class <%= klass %>Importer < Effective::CsvImporter
3
+ def columns
4
+ {<% columns.each_with_index do |column, index| %>
5
+ <%= column.to_s.underscore.tap { |name| [' ', '/', '(', ')', '__'].each { |str| name.gsub!(str, '_') } }.to_sym %>: <%= (letters[index] || index) %><%= ',' unless (index+1) == columns.length %><% end %>
6
+ }
7
+ end
8
+
9
+ def process_row
10
+ # assign_columns(<%= klass.singularize %>.new).save!
11
+ raise 'todo'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ <% module_namespacing do -%>
2
+ class <%= resource.class_name %> < <%= parent_class_name.classify %>
3
+ <% resource.belong_tos.each do || ass -%>
4
+ belongs_to :<%= ass.name %><%= ', polymorphic: true' if ass.polymorphic? %>
5
+ <% end -%>
6
+
7
+ effective_resource do
8
+ <% invoked_attributes.each do |name, (type, _)| -%>
9
+ <%= name.to_s.ljust(max_attribute_name_length) %> :<%= type %>
10
+ <% end -%>
11
+
12
+ timestamps
13
+ end
14
+
15
+ scope :deep, -> { all }
16
+
17
+ <% invoked_attributes.each do |name, (type, _)| -%>
18
+ validates :<%= name %>, presence: true
19
+ <% end -%>
20
+
21
+ def to_s
22
+ <% if to_s_attribute.present? -%>
23
+ <%= to_s_attribute %> || 'New <%= resource.human_name %>'
24
+ <% else %>
25
+ '<%= resource.human_name %>'
26
+ <% end -%>
27
+ end
28
+
29
+ end
30
+ <% end -%>
@@ -0,0 +1,15 @@
1
+ = tabs do
2
+ = tab '<%= resource.human_name.titleize %>' do
3
+ = render '<%= resource.view_file_path("form_#{resource.name}") %>', <%= resource.name %>: <%= resource.name %>
4
+
5
+ <%- if resource.nested_resources.present? %>
6
+ - if <%= resource.name %>.persisted?
7
+ <%- resource.nested_resources.each do |nested_resource| -%>
8
+ = tab '<%= nested_resource.plural_name.titleize %>' do
9
+ = render_datatable(<%= nested_resource.klass.name %>Datatable.new(<%= resource.name %>_id: <%= resource.name %>.id))
10
+
11
+ <%- end -%>
12
+ <% end -%>
13
+ - if <%= resource.name %>.persisted? && <%= resource.name %>.respond_to?(:logs_datatable)
14
+ = tab 'Logs' do
15
+ = render_datatable(<%= resource.name %>.logs_datatable, inline: true)
@@ -0,0 +1,15 @@
1
+ <% if resource.module_name.present? -%>
2
+ module <%= resource.module_name %>
3
+ class <%= resource.module_namespaced %>Controller < <%= resource.module_namespace %>ApplicationController
4
+ before_action(:authenticate_user!) if defined?(Devise)
5
+
6
+ include Effective::CrudController
7
+ end
8
+ end
9
+ <% else -%>
10
+ class <%= resource.namespaced_class_name.pluralize %>Controller < <%= resource.module_namespace %>ApplicationController
11
+ before_action(:authenticate_user!) if defined?(Devise)
12
+
13
+ include Effective::CrudController
14
+ end
15
+ <% end -%>
@@ -0,0 +1,28 @@
1
+ class <%= resource.module_name %><%= resource.module_namespaced %>Datatable < Effective::Datatable
2
+ datatable do
3
+ order :updated_at
4
+
5
+ col :updated_at, visible: false
6
+ col :created_at, visible: false
7
+ col :id, visible: false
8
+
9
+ <% if resource.belong_tos.present? || resource.has_anys.present? -%>
10
+ <% resource.belong_tos.each do |reference| -%>
11
+ col :<%= reference.name %>
12
+ <% end -%>
13
+ <% resource.has_anys.each do |reference| -%>
14
+ col :<%= reference.name %>
15
+ <% end -%>
16
+
17
+ <% end -%>
18
+ <% attributes.except(:created_at, :updated_at, :id).each do |name, _| -%>
19
+ col :<%= name %>
20
+ <% end -%>
21
+
22
+ actions_col
23
+ end
24
+
25
+ collection do
26
+ <%= resource.class_name %>.deep.all
27
+ end
28
+ end
@@ -0,0 +1,14 @@
1
+ module CsvImporters
2
+ class <%= klass %>Importer < Effective::CsvImporter
3
+ def columns
4
+ {<% columns.each_with_index do |column, index| %>
5
+ <%= column.to_s.underscore.tap { |name| [' ', '/', '(', ')', '__'].each { |str| name.gsub!(str, '_') } }.to_sym %>: <%= (letters[index] || index) %><%= ',' unless (index+1) == columns.length %><% end %>
6
+ }
7
+ end
8
+
9
+ def process_row
10
+ # assign_columns(<%= klass.singularize %>.new).save!
11
+ raise 'todo'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ <% module_namespacing do -%>
2
+ class <%= resource.class_name %> < <%= parent_class_name.classify %>
3
+ <% resource.belong_tos.each do || ass -%>
4
+ belongs_to :<%= ass.name %><%= ', polymorphic: true' if ass.polymorphic? %>
5
+ <% end -%>
6
+
7
+ effective_resource do
8
+ <% invoked_attributes.each do |name, (type, _)| -%>
9
+ <%= name.to_s.ljust(max_attribute_name_length) %> :<%= type %>
10
+ <% end -%>
11
+
12
+ timestamps
13
+ end
14
+
15
+ scope :deep, -> { all }
16
+
17
+ <% invoked_attributes.each do |name, (type, _)| -%>
18
+ validates :<%= name %>, presence: true
19
+ <% end -%>
20
+
21
+ def to_s
22
+ <% if to_s_attribute.present? -%>
23
+ <%= to_s_attribute %> || 'New <%= resource.human_name %>'
24
+ <% else %>
25
+ '<%= resource.human_name %>'
26
+ <% end -%>
27
+ end
28
+
29
+ end
30
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ <% if resource.namespace.present? -%>
2
+ = effective_form_with(model: [:<%= resource.namespace %>, <%= resource.name %>], engine: true) do |f|
3
+ <% else -%>
4
+ = effective_form_with(model: <%= resource.name %>, engine: true) do |f|
5
+ <% end -%>
6
+ <% resource.belong_tos.each do |reference| -%>
7
+ <%= render_field(reference, depth: 1) %>
8
+ <% end -%>
9
+ <% attributes.each do |attribute| -%>
10
+ <%= render_field(attribute, depth: 1) %>
11
+ <% end -%>
12
+
13
+ = effective_submit(f)
@@ -0,0 +1,2 @@
1
+ .effective-<%= resource.name %>
2
+ = yield
@@ -0,0 +1,13 @@
1
+ = render 'effective/<%= resource.plural_name %>/layout' do
2
+ %table.table
3
+ %tbody
4
+ <% resource.belong_tos.each do |reference| -%>
5
+ %tr
6
+ %th <%= reference.name.to_s.titleize %>
7
+ %td= <%= resource.name %>.<%= reference.name %>
8
+ <% end -%>
9
+ <% attributes.each do |name, (type, _)| -%>
10
+ %tr
11
+ %th <%= name.to_s.titleize %>
12
+ %td= <%= resource.name %>.<%= name %>
13
+ <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_developer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -71,32 +71,46 @@ files:
71
71
  - lib/generators/effective/scaffold_generator.rb
72
72
  - lib/generators/effective/views_generator.rb
73
73
  - lib/generators/effective_developer/install_generator.rb
74
- - lib/scaffolds/controllers/controller.rb
75
- - lib/scaffolds/datatables/datatable.rb
76
- - lib/scaffolds/forms/fields/_field_belongs_to.html.haml
77
- - lib/scaffolds/forms/fields/_field_boolean.html.haml
78
- - lib/scaffolds/forms/fields/_field_date.html.haml
79
- - lib/scaffolds/forms/fields/_field_datetime.html.haml
80
- - lib/scaffolds/forms/fields/_field_decimal.html.haml
81
- - lib/scaffolds/forms/fields/_field_email.html.haml
82
- - lib/scaffolds/forms/fields/_field_float.html.haml
83
- - lib/scaffolds/forms/fields/_field_hstore.html.haml
84
- - lib/scaffolds/forms/fields/_field_inet.html.haml
85
- - lib/scaffolds/forms/fields/_field_integer.html.haml
86
- - lib/scaffolds/forms/fields/_field_nested_resource.html.haml
87
- - lib/scaffolds/forms/fields/_field_phone.html.haml
88
- - lib/scaffolds/forms/fields/_field_price.html.haml
89
- - lib/scaffolds/forms/fields/_field_select.html.haml
90
- - lib/scaffolds/forms/fields/_field_select_constant.html.haml
91
- - lib/scaffolds/forms/fields/_field_string.html.haml
92
- - lib/scaffolds/forms/fields/_field_text.html.haml
93
- - lib/scaffolds/forms/fields/_nested_resource_fields.html.haml
94
- - lib/scaffolds/forms/flat/_form.html.haml
95
- - lib/scaffolds/forms/tabbed/_form.html.haml
96
- - lib/scaffolds/forms/tabbed/_form_resource.html.haml
97
- - lib/scaffolds/importers/csv_importer.rb
98
- - lib/scaffolds/models/model.rb
99
- - lib/scaffolds/views/_resource.html.haml
74
+ - lib/scaffolds/admin_effective/controllers/controller.rb
75
+ - lib/scaffolds/admin_effective/datatables/datatable.rb
76
+ - lib/scaffolds/admin_effective/importers/csv_importer.rb
77
+ - lib/scaffolds/admin_effective/models/model.rb
78
+ - lib/scaffolds/admin_effective/views/_form.html.haml
79
+ - lib/scaffolds/admin_effective/views/_form_resource.html.haml
80
+ - lib/scaffolds/admin_effective/views/_resource.html.haml
81
+ - lib/scaffolds/basic/controllers/controller.rb
82
+ - lib/scaffolds/basic/datatables/datatable.rb
83
+ - lib/scaffolds/basic/importers/csv_importer.rb
84
+ - lib/scaffolds/basic/models/model.rb
85
+ - lib/scaffolds/basic/views/_form.html.haml
86
+ - lib/scaffolds/basic/views/_form_resource.html.haml
87
+ - lib/scaffolds/basic/views/_resource.html.haml
88
+ - lib/scaffolds/effective/controllers/controller.rb
89
+ - lib/scaffolds/effective/datatables/datatable.rb
90
+ - lib/scaffolds/effective/importers/csv_importer.rb
91
+ - lib/scaffolds/effective/models/model.rb
92
+ - lib/scaffolds/effective/views/_form.html.haml
93
+ - lib/scaffolds/effective/views/_form_resource.html.haml
94
+ - lib/scaffolds/effective/views/_layout.html.haml
95
+ - lib/scaffolds/effective/views/_resource.html.haml
96
+ - lib/scaffolds/fields/_field_belongs_to.html.haml
97
+ - lib/scaffolds/fields/_field_boolean.html.haml
98
+ - lib/scaffolds/fields/_field_date.html.haml
99
+ - lib/scaffolds/fields/_field_datetime.html.haml
100
+ - lib/scaffolds/fields/_field_decimal.html.haml
101
+ - lib/scaffolds/fields/_field_email.html.haml
102
+ - lib/scaffolds/fields/_field_float.html.haml
103
+ - lib/scaffolds/fields/_field_hstore.html.haml
104
+ - lib/scaffolds/fields/_field_inet.html.haml
105
+ - lib/scaffolds/fields/_field_integer.html.haml
106
+ - lib/scaffolds/fields/_field_nested_resource.html.haml
107
+ - lib/scaffolds/fields/_field_phone.html.haml
108
+ - lib/scaffolds/fields/_field_price.html.haml
109
+ - lib/scaffolds/fields/_field_select.html.haml
110
+ - lib/scaffolds/fields/_field_select_constant.html.haml
111
+ - lib/scaffolds/fields/_field_string.html.haml
112
+ - lib/scaffolds/fields/_field_text.html.haml
113
+ - lib/scaffolds/fields/_nested_resource_fields.html.haml
100
114
  - lib/tasks/annotate.rake
101
115
  - lib/tasks/effective_csv_importer.rake
102
116
  - lib/tasks/hatchbox.rake
@@ -1,9 +0,0 @@
1
- = effective_form_with(model: <%= form_for %>) do |f|
2
- <% resource.belong_tos.each do |reference| -%>
3
- <%= render_field(reference, depth: 1) %>
4
- <% end -%>
5
- <% attributes.each do |attribute| -%>
6
- <%= render_field(attribute, depth: 1) %>
7
- <% end -%>
8
-
9
- = effective_submit(f)