OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add test
[pettanr/pettanr.git]
/
app
/
models
/
common_license.rb
diff --git
a/app/models/common_license.rb
b/app/models/common_license.rb
index
834ee88
..
d480437
100644
(file)
--- a/
app/models/common_license.rb
+++ b/
app/models/common_license.rb
@@
-15,4
+15,12
@@
class CommonLicense < ActiveRecord::Base
res
end
+ def self.import_file(filename)
+ t = File.open(filename, 'r').read
+ j = JSON.parse t
+ l = CommonLicense.new j
+ l.save_save
+ p l.id
+ end
+
end