Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tallty_import_export
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
tallty_import_export
Commits
e093080d
Commit
e093080d
authored
Nov 20, 2020
by
Ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add autoload FormConvert
parent
b97c253d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
tallty_import_export.rb
lib/tallty_import_export.rb
+1
-0
export.rb
lib/tallty_import_export/export.rb
+1
-2
form_convert.rb
lib/tallty_import_export/form_convert.rb
+1
-1
No files found.
lib/tallty_import_export.rb
View file @
e093080d
...
...
@@ -12,6 +12,7 @@ module TalltyImportExport
autoload
:Importable
autoload
:Import
autoload
:Context
autoload
:FormConvert
class
Error
<
StandardError
;
end
end
lib/tallty_import_export/export.rb
View file @
e093080d
...
...
@@ -14,7 +14,7 @@ module TalltyImportExport
# method: 导出时本地调用的方法
# chain: 导出时对象属性通过链式调用
def
export_
xlsx
records
,
options
=
{}
def
export_
records
records
,
options
=
{}
exportable_defaults
(
options
)
options
=
options
.
with_indifferent_access
...
...
@@ -67,7 +67,6 @@ module TalltyImportExport
end
def
export_headers
binding
.
pry
klass
.
try
(
:headers
)
||
klass
.
try
(
:model_headers
)
end
...
...
lib/tallty_import_export/form_convert.rb
View file @
e093080d
module
TalltyImportExport
class
FormConvert
class
<<
self
def
import_
headers
form
,
column_name: :payload
def
headers
form
,
column_name: :payload
form
.
fields
.
map
do
|
field
|
{}.
tap
do
|
q
|
q
[
:key
]
=
field
.
key
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment