OSDN Git Service

add new model
authoryasushiito <yas@pen-chan.jp>
Sun, 17 Jun 2012 06:11:20 +0000 (15:11 +0900)
committeryasushiito <yas@pen-chan.jp>
Sun, 17 Jun 2012 06:11:20 +0000 (15:11 +0900)
17 files changed:
app/assets/stylesheets/license_group.css.scss [new file with mode: 0644]
app/assets/stylesheets/resource_picture_license.css.scss [new file with mode: 0644]
app/controllers/license_group_controller.rb [new file with mode: 0644]
app/controllers/resource_picture_license_controller.rb [new file with mode: 0644]
app/helpers/license_group_helper.rb [new file with mode: 0644]
app/helpers/resource_picture_license_helper.rb [new file with mode: 0644]
app/models/license_group.rb [new file with mode: 0644]
app/models/resource_picture_license.rb [new file with mode: 0644]
db/migrate/20120617054342_create_license_groups.rb [new file with mode: 0644]
db/migrate/20120617055928_create_resource_picture_licenses.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/license_group_controller_spec.rb [new file with mode: 0644]
spec/controllers/resource_picture_license_controller_spec.rb [new file with mode: 0644]
spec/helpers/license_group_helper_spec.rb [new file with mode: 0644]
spec/helpers/resource_picture_license_helper_spec.rb [new file with mode: 0644]
spec/models/license_group_spec.rb [new file with mode: 0644]
spec/models/resource_picture_license_spec.rb [new file with mode: 0644]

diff --git a/app/assets/stylesheets/license_group.css.scss b/app/assets/stylesheets/license_group.css.scss
new file mode 100644 (file)
index 0000000..bdb12d9
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the LicenseGroup controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/resource_picture_license.css.scss b/app/assets/stylesheets/resource_picture_license.css.scss
new file mode 100644 (file)
index 0000000..ed0bb8e
--- /dev/null
@@ -0,0 +1,3 @@
+// Place all the styles related to the ResourcePictureLicense controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/license_group_controller.rb b/app/controllers/license_group_controller.rb
new file mode 100644 (file)
index 0000000..198869d
--- /dev/null
@@ -0,0 +1,2 @@
+class LicenseGroupController < ApplicationController
+end
diff --git a/app/controllers/resource_picture_license_controller.rb b/app/controllers/resource_picture_license_controller.rb
new file mode 100644 (file)
index 0000000..aecb5c3
--- /dev/null
@@ -0,0 +1,2 @@
+class ResourcePictureLicenseController < ApplicationController
+end
diff --git a/app/helpers/license_group_helper.rb b/app/helpers/license_group_helper.rb
new file mode 100644 (file)
index 0000000..0c2564b
--- /dev/null
@@ -0,0 +1,2 @@
+module LicenseGroupHelper
+end
diff --git a/app/helpers/resource_picture_license_helper.rb b/app/helpers/resource_picture_license_helper.rb
new file mode 100644 (file)
index 0000000..5dbfc83
--- /dev/null
@@ -0,0 +1,2 @@
+module ResourcePictureLicenseHelper
+end
diff --git a/app/models/license_group.rb b/app/models/license_group.rb
new file mode 100644 (file)
index 0000000..d59ba4e
--- /dev/null
@@ -0,0 +1,2 @@
+class LicenseGroup < ActiveRecord::Base
+end
diff --git a/app/models/resource_picture_license.rb b/app/models/resource_picture_license.rb
new file mode 100644 (file)
index 0000000..5d4d0b2
--- /dev/null
@@ -0,0 +1,2 @@
+class ResourcePictureLicense < ActiveRecord::Base
+end
diff --git a/db/migrate/20120617054342_create_license_groups.rb b/db/migrate/20120617054342_create_license_groups.rb
new file mode 100644 (file)
index 0000000..357b78d
--- /dev/null
@@ -0,0 +1,12 @@
+class CreateLicenseGroups < ActiveRecord::Migration
+  def change
+    create_table :license_groups do |t|
+      t.string :name, :null => false, :limit => 50
+      t.string :classname, :null => false, :limit => 50
+      t.string :caption, :null => false, :limit => 30
+      t.string :url, :null => false
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20120617055928_create_resource_picture_licenses.rb b/db/migrate/20120617055928_create_resource_picture_licenses.rb
new file mode 100644 (file)
index 0000000..a0ebffd
--- /dev/null
@@ -0,0 +1,13 @@
+class CreateResourcePictureLicenses < ActiveRecord::Migration
+  def change
+    create_table :resource_picture_licenses do |t|
+      t.integer :resource_picture_id, :null => false
+      t.integer :license_id, :null => false
+      t.string :artist_name, :null => false
+      t.string :credit
+      t.string :settings
+
+      t.timestamps
+    end
+  end
+end
index 771d543..d488500 100644 (file)
@@ -11,7 +11,7 @@
 #\r
 # It's strongly recommended to check this file into your version control system.\r
 \r
-ActiveRecord::Schema.define(:version => 20120424100555) do\r
+ActiveRecord::Schema.define(:version => 20120617055928) do\r
 \r
   create_table "admins", :force => true do |t|\r
     t.string   "email",                                 :default => "", :null => false\r
@@ -103,6 +103,15 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
     t.datetime "updated_at"\r
   end\r
 \r
+  create_table "license_groups", :force => true do |t|\r
+    t.string   "name",       :limit => 50, :null => false\r
+    t.string   "classname",  :limit => 50, :null => false\r
+    t.string   "caption",    :limit => 30, :null => false\r
+    t.string   "url",                      :null => false\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
   create_table "licenses", :force => true do |t|\r
     t.string   "name",                             :null => false\r
     t.string   "url",                              :null => false\r
@@ -181,6 +190,16 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
 \r
   add_index "panels", ["author_id"], :name => "index_panels_on_author_id"\r
 \r
+  create_table "resource_picture_licenses", :force => true do |t|\r
+    t.integer  "resource_picture_id", :null => false\r
+    t.integer  "license_id",          :null => false\r
+    t.string   "artist_name",         :null => false\r
+    t.string   "credit"\r
+    t.string   "settings"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
   create_table "resource_pictures", :force => true do |t|\r
     t.string   "ext",                                :null => false\r
     t.integer  "width",                              :null => false\r
diff --git a/spec/controllers/license_group_controller_spec.rb b/spec/controllers/license_group_controller_spec.rb
new file mode 100644 (file)
index 0000000..ea21c4e
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe LicenseGroupController do
+
+end
diff --git a/spec/controllers/resource_picture_license_controller_spec.rb b/spec/controllers/resource_picture_license_controller_spec.rb
new file mode 100644 (file)
index 0000000..33c2774
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe ResourcePictureLicenseController do
+
+end
diff --git a/spec/helpers/license_group_helper_spec.rb b/spec/helpers/license_group_helper_spec.rb
new file mode 100644 (file)
index 0000000..9ca2df5
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the LicenseGroupHelper. For example:
+#
+# describe LicenseGroupHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe LicenseGroupHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/resource_picture_license_helper_spec.rb b/spec/helpers/resource_picture_license_helper_spec.rb
new file mode 100644 (file)
index 0000000..34345c6
--- /dev/null
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the ResourcePictureLicenseHelper. For example:
+#
+# describe ResourcePictureLicenseHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       helper.concat_strings("this","that").should == "this that"
+#     end
+#   end
+# end
+describe ResourcePictureLicenseHelper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/license_group_spec.rb b/spec/models/license_group_spec.rb
new file mode 100644 (file)
index 0000000..fddc68a
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe LicenseGroup do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/resource_picture_license_spec.rb b/spec/models/resource_picture_license_spec.rb
new file mode 100644 (file)
index 0000000..de4e4f5
--- /dev/null
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe ResourcePictureLicense do
+  pending "add some examples to (or delete) #{__FILE__}"
+end