rails_age 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/generators/apache_age/edge/edge_generator.rb +4 -2
- data/lib/generators/apache_age/{generate_entity_methods.rb → generator_entity_helpers.rb} +2 -2
- data/lib/generators/apache_age/generator_resource_helpers.rb +6 -0
- data/lib/generators/apache_age/node/node_generator.rb +4 -2
- data/lib/generators/apache_age/scaffold_node/USAGE +16 -0
- data/lib/generators/apache_age/scaffold_node/scaffold_node_generator.rb +68 -0
- data/lib/generators/apache_age/scaffold_node/templates/node_controller.rb.tt +50 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/_form.html.erb copy.tt +37 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/_form.html.erb.tt +37 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/edit.html.erb copy.tt +12 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/edit.html.erb.tt +12 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/index.html.erb copy.tt +16 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/index.html.erb.tt +16 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/new.html.erb copy.tt +11 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/new.html.erb.tt +11 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/partial.html.erb copy.tt +17 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/partial.html.erb.tt +17 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/show.html.erb copy.tt +10 -0
- data/lib/generators/apache_age/scaffold_node/templates/views/show.html.erb.tt +10 -0
- data/lib/rails_age/version.rb +1 -1
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d54712ca67a303ffa92d78165d30a500b1f695be6176b3198e7ff3f9f60ab4f9
|
4
|
+
data.tar.gz: 8f8f999c42777dc432bf543b6256852d10a0fbcbcd4fe33ad06817277a47bb5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75c804a5b29705a18344ea70d9a799ea3578d90055b056ba48b70984132f2fbd04bdd906ac744e2a587fe095e9a8e112d773ecc84cf6325be192c212d769090d
|
7
|
+
data.tar.gz: 932a6c5843243a23ef48b69e87f0fef940030c9e47ce652be141bc6efb45a8cbde04c191853b3d15e754e3ee71d7033b301ab6432982c1fc357250fceb892f02
|
data/CHANGELOG.md
CHANGED
@@ -32,7 +32,14 @@ breaking change?: namespaces (by default) will use their own schema? (add to dat
|
|
32
32
|
`rails generate apache_age:edge HasPet owner_role start_node:person end_node:pet`
|
33
33
|
with property and specified start-/end-nodes (person and pet nodes must have already been created)
|
34
34
|
|
35
|
-
## VERSION 0.5.
|
35
|
+
## VERSION 0.5.2 - 2024-06-16
|
36
|
+
|
37
|
+
- **Node Scaffold** (generates node, type, view and controller)
|
38
|
+
* add `rails generate apache_age:node_scaffold Person first_name last_name age:integer`
|
39
|
+
|
40
|
+
## VERSION 0.5.1 - 2024-06-16
|
41
|
+
|
42
|
+
**yanked** (2024-06-16) - had an issue with the generator
|
36
43
|
|
37
44
|
- **Node Scaffold** (generates node, type, view and controller)
|
38
45
|
* add `rails generate apache_age:node_scaffold Person first_name last_name age:integer`
|
@@ -2,13 +2,15 @@
|
|
2
2
|
require 'rails/generators'
|
3
3
|
require 'rails/generators/named_base'
|
4
4
|
|
5
|
-
require_relative '../
|
5
|
+
require_relative '../generator_entity_helpers'
|
6
6
|
# TODO: get generators to work with custom types!
|
7
7
|
# require_relative "#{Rails.root}/config/initializers/types"
|
8
8
|
|
9
9
|
module ApacheAge
|
10
10
|
class EdgeGenerator < Rails::Generators::NamedBase
|
11
|
-
include ApacheAge::
|
11
|
+
include ApacheAge::GeneratorEntityHelpers
|
12
|
+
|
13
|
+
desc "Generates edge (model) with attributes."
|
12
14
|
|
13
15
|
source_root File.expand_path('templates', __dir__)
|
14
16
|
argument :attributes, type: :array, default: [], banner: "field:type field:type"
|
@@ -1,7 +1,7 @@
|
|
1
|
-
# lib/generators/apache_age/
|
1
|
+
# lib/generators/apache_age/generator_entity_helpers.rb
|
2
2
|
|
3
3
|
module ApacheAge
|
4
|
-
module
|
4
|
+
module GeneratorEntityHelpers
|
5
5
|
def generate_age_entity(age_type)
|
6
6
|
template "#{age_type}.rb.tt", File.join(destination_root, "app/#{age_type}s", class_path, "#{file_name}.rb")
|
7
7
|
add_type_config
|
@@ -2,11 +2,13 @@
|
|
2
2
|
require 'rails/generators'
|
3
3
|
require 'rails/generators/named_base'
|
4
4
|
|
5
|
-
require_relative '../
|
5
|
+
require_relative '../generator_entity_helpers'
|
6
6
|
|
7
7
|
module ApacheAge
|
8
8
|
class NodeGenerator < Rails::Generators::NamedBase
|
9
|
-
include ApacheAge::
|
9
|
+
include ApacheAge::GeneratorEntityHelpers
|
10
|
+
|
11
|
+
desc "Generates node (model) with attributes."
|
10
12
|
|
11
13
|
source_root File.expand_path('templates', __dir__)
|
12
14
|
argument :attributes, type: :array, default: [], banner: "field:type field:type"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Description:
|
2
|
+
Explain the generator
|
3
|
+
|
4
|
+
Example:
|
5
|
+
bin/rails generate apache_age:scaffold_node Pet name birthdate:date
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
create app/nodes/pet.rb
|
9
|
+
modified: config/initializers/types.rb
|
10
|
+
create app/controllers/pets_controller.rb
|
11
|
+
route resources :pets
|
12
|
+
create app/views/pets/index.html.erb
|
13
|
+
create app/views/pets/edit.html.erb
|
14
|
+
create app/views/pets/show.html.erb
|
15
|
+
create app/views/pets/new.html.erb
|
16
|
+
create app/views/pets/partial.html.erb
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# lib/generators/apache_age/scaffold_node/scaffold_node_generator.rb
|
2
|
+
|
3
|
+
require 'rails/generators'
|
4
|
+
require 'rails/generators/named_base'
|
5
|
+
require 'rails/generators/resource_helpers'
|
6
|
+
|
7
|
+
require_relative '../generator_entity_helpers'
|
8
|
+
require_relative '../generator_resource_helpers'
|
9
|
+
|
10
|
+
module ApacheAge
|
11
|
+
class ScaffoldNodeGenerator < Rails::Generators::NamedBase
|
12
|
+
include Rails::Generators::ResourceHelpers
|
13
|
+
# include ApacheAge::GeneratorEntityHelpers
|
14
|
+
# include ApacheAge::GeneratorResourceHelpers
|
15
|
+
|
16
|
+
desc "Generates a node, and its controller and views with the given attributes."
|
17
|
+
|
18
|
+
source_root File.expand_path("templates", __dir__)
|
19
|
+
|
20
|
+
argument :attributes, type: :array, default: [], banner: "field:type field:type"
|
21
|
+
|
22
|
+
def create_model_file
|
23
|
+
invoke 'apache_age:node', [name] + attributes.collect { |attr| "#{attr.name}:#{attr.type}" }
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_controller_files
|
27
|
+
template(
|
28
|
+
"node_controller.rb.tt",
|
29
|
+
File.join("app/controllers", controller_class_path, "#{controller_file_name}_controller.rb")
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_route
|
34
|
+
if class_path.empty?
|
35
|
+
route "resources :#{file_name.pluralize}"
|
36
|
+
else
|
37
|
+
route nested_route(class_path, file_name)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def copy_view_files
|
42
|
+
available_views.each do |view|
|
43
|
+
view_name = view == 'partial' ? "_#{singular_table_name}" : view
|
44
|
+
filename = filename_with_extensions(view_name)
|
45
|
+
template "views/#{view}.html.erb.tt", File.join("app/views", controller_file_path, filename)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def available_views
|
52
|
+
%w[index edit show new partial _form]
|
53
|
+
end
|
54
|
+
|
55
|
+
def filename_with_extensions(view)
|
56
|
+
[view, :html, :erb].compact.join('.')
|
57
|
+
end
|
58
|
+
|
59
|
+
def nested_route(class_path, file_name)
|
60
|
+
# "namespace :#{class_path.join(':')} do\n resources :#{file_name.pluralize}\nend"
|
61
|
+
<<~RUBY
|
62
|
+
namespace :#{class_path.join(':')} do
|
63
|
+
resources :#{file_name.pluralize}
|
64
|
+
end
|
65
|
+
RUBY
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class <%= controller_class_name %>Controller < ApplicationController
|
2
|
+
before_action :set_<%= singular_table_name %>, only: %i[show edit update destroy]
|
3
|
+
|
4
|
+
def index
|
5
|
+
@<%= plural_table_name %> = <%= class_name %>.all
|
6
|
+
end
|
7
|
+
|
8
|
+
def show
|
9
|
+
end
|
10
|
+
|
11
|
+
def new
|
12
|
+
@<%= singular_table_name %> = <%= class_name %>.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def edit
|
16
|
+
end
|
17
|
+
|
18
|
+
def create
|
19
|
+
@<%= singular_table_name %> = <%= class_name %>.new(<%= singular_table_name %>_params)
|
20
|
+
|
21
|
+
if @<%= singular_table_name %>.save
|
22
|
+
redirect_to @<%= singular_table_name %>, notice: '<%= human_name %> was successfully created.'
|
23
|
+
else
|
24
|
+
render :new
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def update
|
29
|
+
if @<%= singular_table_name %>.update(<%= singular_table_name %>_params)
|
30
|
+
redirect_to @<%= singular_table_name %>, notice: '<%= human_name %> was successfully updated.'
|
31
|
+
else
|
32
|
+
render :edit
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def destroy
|
37
|
+
@<%= singular_table_name %>.destroy
|
38
|
+
redirect_to <%= index_helper %>_url, notice: '<%= human_name %> was successfully destroyed.'
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def set_<%= singular_table_name %>
|
44
|
+
@<%= singular_table_name %> = <%= class_name %>.find(params[:id])
|
45
|
+
end
|
46
|
+
|
47
|
+
def <%= singular_table_name %>_params
|
48
|
+
params.require(:<%= singular_table_name %>).permit(<%= attributes.map { |attr| ":#{attr.name}" }.join(', ') %>)
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%%= form_with(model: <%= model_resource_name %>) do |form| %>
|
2
|
+
<%% if <%= singular_table_name %>.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<%% <%= singular_table_name %>.errors.each do |error| %>
|
8
|
+
<li><%%= error.full_message %></li>
|
9
|
+
<%% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<%% end %>
|
13
|
+
|
14
|
+
<% attributes.each do |attribute| -%>
|
15
|
+
<div>
|
16
|
+
<% if attribute.password_digest? -%>
|
17
|
+
<%%= form.label :password, style: "display: block" %>
|
18
|
+
<%%= form.password_field :password %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div>
|
22
|
+
<%%= form.label :password_confirmation, style: "display: block" %>
|
23
|
+
<%%= form.password_field :password_confirmation %>
|
24
|
+
<% elsif attribute.attachments? -%>
|
25
|
+
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
|
26
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %>
|
27
|
+
<% else -%>
|
28
|
+
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
|
29
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %>
|
30
|
+
<% end -%>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<% end -%>
|
34
|
+
<div>
|
35
|
+
<%%= form.submit %>
|
36
|
+
</div>
|
37
|
+
<%% end %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%%= form_with(model: <%= model_resource_name %>) do |form| %>
|
2
|
+
<%% if <%= singular_table_name %>.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<%% <%= singular_table_name %>.errors.each do |error| %>
|
8
|
+
<li><%%= error.full_message %></li>
|
9
|
+
<%% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<%% end %>
|
13
|
+
|
14
|
+
<% attributes.each do |attribute| -%>
|
15
|
+
<div>
|
16
|
+
<% if attribute.password_digest? -%>
|
17
|
+
<%%= form.label :password, style: "display: block" %>
|
18
|
+
<%%= form.password_field :password %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div>
|
22
|
+
<%%= form.label :password_confirmation, style: "display: block" %>
|
23
|
+
<%%= form.password_field :password_confirmation %>
|
24
|
+
<% elsif attribute.attachments? -%>
|
25
|
+
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
|
26
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %>
|
27
|
+
<% else -%>
|
28
|
+
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
|
29
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %>
|
30
|
+
<% end -%>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<% end -%>
|
34
|
+
<div>
|
35
|
+
<%%= form.submit %>
|
36
|
+
</div>
|
37
|
+
<%% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%% content_for :title, "Editing <%= human_name.downcase %>" %>
|
2
|
+
|
3
|
+
<h1>Editing <%= human_name.downcase %></h1>
|
4
|
+
|
5
|
+
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
6
|
+
|
7
|
+
<br>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %> %> |
|
11
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
12
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%% content_for :title, "Editing <%= human_name.downcase %>" %>
|
2
|
+
|
3
|
+
<h1>Editing <%= human_name.downcase %></h1>
|
4
|
+
|
5
|
+
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
6
|
+
|
7
|
+
<br>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %> %> |
|
11
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
12
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<p style="color: green"><%%= notice %></p>
|
2
|
+
|
3
|
+
<%% content_for :title, "<%= human_name.pluralize %>" %>
|
4
|
+
|
5
|
+
<h1><%= human_name.pluralize %></h1>
|
6
|
+
|
7
|
+
<div id="<%= plural_table_name %>">
|
8
|
+
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
9
|
+
<%%= render <%= singular_table_name %> %>
|
10
|
+
<p>
|
11
|
+
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %> %>
|
12
|
+
</p>
|
13
|
+
<%% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%%= link_to "New <%= human_name.downcase %>", <%= new_helper(type: :path) %> %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<p style="color: green"><%%= notice %></p>
|
2
|
+
|
3
|
+
<%% content_for :title, "<%= human_name.pluralize %>" %>
|
4
|
+
|
5
|
+
<h1><%= human_name.pluralize %></h1>
|
6
|
+
|
7
|
+
<div id="<%= plural_table_name %>">
|
8
|
+
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
9
|
+
<%%= render '<%= singular_table_name %>', <%= singular_table_name %>: <%= singular_table_name %> %>
|
10
|
+
<p>
|
11
|
+
<%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %> %>
|
12
|
+
</p>
|
13
|
+
<%% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%%= link_to "New <%= human_name.downcase %>", <%= new_helper(type: :path) %> %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%% content_for :title, "New <%= human_name.downcase %>" %>
|
2
|
+
|
3
|
+
<h1>New <%= human_name.downcase %></h1>
|
4
|
+
|
5
|
+
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
6
|
+
|
7
|
+
<br>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
11
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%% content_for :title, "New <%= human_name.downcase %>" %>
|
2
|
+
|
3
|
+
<h1>New <%= human_name.downcase %></h1>
|
4
|
+
|
5
|
+
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
|
6
|
+
|
7
|
+
<br>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
11
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div id="<%%= dom_id <%= singular_table_name %> %>">
|
2
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
3
|
+
<p>
|
4
|
+
<strong><%= attribute.human_name %>:</strong>
|
5
|
+
<% if attribute.attachment? -%>
|
6
|
+
<%%= link_to <%= singular_table_name %>.<%= attribute.column_name %>.filename, <%= singular_table_name %>.<%= attribute.column_name %> if <%= singular_table_name %>.<%= attribute.column_name %>.attached? %>
|
7
|
+
<% elsif attribute.attachments? -%>
|
8
|
+
<%% <%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_table_name %>| %>
|
9
|
+
<div><%%= link_to <%= attribute.singular_table_name %>.filename, <%= attribute.singular_table_name %> %></div>
|
10
|
+
<%% end %>
|
11
|
+
<% else -%>
|
12
|
+
<%%= <%= singular_table_name %>.<%= attribute.column_name %> %>
|
13
|
+
<% end -%>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<% end -%>
|
17
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div id="<%%= dom_id <%= singular_table_name %> %>">
|
2
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
3
|
+
<p>
|
4
|
+
<strong><%= attribute.human_name %>:</strong>
|
5
|
+
<% if attribute.attachment? -%>
|
6
|
+
<%%= link_to <%= singular_table_name %>.<%= attribute.column_name %>.filename, <%= singular_table_name %>.<%= attribute.column_name %> if <%= singular_table_name %>.<%= attribute.column_name %>.attached? %>
|
7
|
+
<% elsif attribute.attachments? -%>
|
8
|
+
<%% <%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
9
|
+
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
10
|
+
<%% end %>
|
11
|
+
<% else -%>
|
12
|
+
<%%= <%= singular_table_name %>.<%= attribute.column_name %> %>
|
13
|
+
<% end -%>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<% end -%>
|
17
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p style="color: green"><%%= notice %></p>
|
2
|
+
|
3
|
+
<%%= render @<%= singular_table_name %> %>
|
4
|
+
|
5
|
+
<div>
|
6
|
+
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %> %> |
|
7
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
8
|
+
|
9
|
+
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete %>
|
10
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p style="color: green"><%%= notice %></p>
|
2
|
+
|
3
|
+
<%%= render '<%= singular_table_name %>', <%= singular_table_name %>: @<%= singular_table_name %> %>
|
4
|
+
|
5
|
+
<div>
|
6
|
+
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %> %> |
|
7
|
+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %> %>
|
8
|
+
|
9
|
+
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete %>
|
10
|
+
</div>
|
data/lib/rails_age/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_age
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Tihen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -79,10 +79,26 @@ files:
|
|
79
79
|
- lib/generators/apache_age/edge/USAGE
|
80
80
|
- lib/generators/apache_age/edge/edge_generator.rb
|
81
81
|
- lib/generators/apache_age/edge/templates/edge.rb.tt
|
82
|
-
- lib/generators/apache_age/
|
82
|
+
- lib/generators/apache_age/generator_entity_helpers.rb
|
83
|
+
- lib/generators/apache_age/generator_resource_helpers.rb
|
83
84
|
- lib/generators/apache_age/node/USAGE
|
84
85
|
- lib/generators/apache_age/node/node_generator.rb
|
85
86
|
- lib/generators/apache_age/node/templates/node.rb.tt
|
87
|
+
- lib/generators/apache_age/scaffold_node/USAGE
|
88
|
+
- lib/generators/apache_age/scaffold_node/scaffold_node_generator.rb
|
89
|
+
- lib/generators/apache_age/scaffold_node/templates/node_controller.rb.tt
|
90
|
+
- lib/generators/apache_age/scaffold_node/templates/views/_form.html.erb copy.tt
|
91
|
+
- lib/generators/apache_age/scaffold_node/templates/views/_form.html.erb.tt
|
92
|
+
- lib/generators/apache_age/scaffold_node/templates/views/edit.html.erb copy.tt
|
93
|
+
- lib/generators/apache_age/scaffold_node/templates/views/edit.html.erb.tt
|
94
|
+
- lib/generators/apache_age/scaffold_node/templates/views/index.html.erb copy.tt
|
95
|
+
- lib/generators/apache_age/scaffold_node/templates/views/index.html.erb.tt
|
96
|
+
- lib/generators/apache_age/scaffold_node/templates/views/new.html.erb copy.tt
|
97
|
+
- lib/generators/apache_age/scaffold_node/templates/views/new.html.erb.tt
|
98
|
+
- lib/generators/apache_age/scaffold_node/templates/views/partial.html.erb copy.tt
|
99
|
+
- lib/generators/apache_age/scaffold_node/templates/views/partial.html.erb.tt
|
100
|
+
- lib/generators/apache_age/scaffold_node/templates/views/show.html.erb copy.tt
|
101
|
+
- lib/generators/apache_age/scaffold_node/templates/views/show.html.erb.tt
|
86
102
|
- lib/rails_age.rb
|
87
103
|
- lib/rails_age/engine.rb
|
88
104
|
- lib/rails_age/version.rb
|