rails_options 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0ef2ddbf381db5c9accfec5a6ca700f1782f0bf051819cb52cd4e1eed59b52a
4
- data.tar.gz: 68ef872fbd4d394a240c376d4c1cf1ab3ee09620311baedf12211be60056f160
3
+ metadata.gz: e44f080c004b1fd3d390fb93f30e9b5bef501ea0e358384844571a3e0f86d0b5
4
+ data.tar.gz: ed7b5e5fa4a101c0439f7d21ce11319bc3cf1dd12c758b4f1f36ffa1fd36fe17
5
5
  SHA512:
6
- metadata.gz: 2ee6330e396c5a52fa833cc5a3b294a2834f22f8fda5dabeae7d410afd801a52449a16cbf03fbbf6559c2399db07031e6df4b3cb969ef4c5bebac9326f810796
7
- data.tar.gz: f6405d248047bd370f3b1f20c2751ed199b18d1f43d5a194147ce4cce4a3e6d8ed997fe651267984277644160a91dc5a882c934dad2ea3617edea5aa7f441ea0
6
+ metadata.gz: 0c6bdc55fe153eb2b110c37e070b8bfcf6360497ba2e8d393061e977d80392e1e090a89d13c9709330855a8668fd962bd02195526989d7bb86636e216f344f0c
7
+ data.tar.gz: 22ef25ba836d8b2cb59cd987e0d7bb5b9f2f170d471bc3ebf4ec4dbb0ae400ddd27058449fe45d54bddf66237237cca439c6561c1e44d02f771ba61f0e2863c4
@@ -1,5 +1,7 @@
1
1
  module RailsOptions
2
2
  class Option < ApplicationRecord
3
+ self.table_name = "rails_options"
4
+
3
5
  before_save :generate_slug
4
6
  validates_uniqueness_of :slug
5
7
 
@@ -1,6 +1,6 @@
1
1
  class CreateRailsOptionsOptions < ActiveRecord::Migration[6.1]
2
2
  def change
3
- create_table :rails_options_options do |t|
3
+ create_table :rails_options do |t|
4
4
  t.string :slug
5
5
  t.string :value
6
6
  t.text :content
@@ -0,0 +1,11 @@
1
+ module RailsOptions
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path("templates", __dir__)
4
+
5
+ desc "Configure necessary files to use RailsOptions"
6
+
7
+ def create_migration
8
+ rake "rails_options:install:migrations"
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsOptions
2
- VERSION = '0.1.0'
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_options
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - afeiship
@@ -37,9 +37,8 @@ files:
37
37
  - app/models/rails_options/application_record.rb
38
38
  - app/models/rails_options/option.rb
39
39
  - config/routes.rb
40
- - db/migrate/20220316133202_create_rails_options_options.rb
41
- - lib/generators/install/USAGE
42
- - lib/generators/install/install_generator.rb
40
+ - db/migrate/20220316133202_create_rails_options.rb
41
+ - lib/generators/rails_options/install/install_generator.rb
43
42
  - lib/rails_options.rb
44
43
  - lib/rails_options/engine.rb
45
44
  - lib/rails_options/version.rb
@@ -1,8 +0,0 @@
1
- Description:
2
- Explain the generator
3
-
4
- Example:
5
- bin/rails generate install Thing
6
-
7
- This will create:
8
- what/will/it/create
@@ -1,9 +0,0 @@
1
- class InstallGenerator < Rails::Generators::NamedBase
2
- source_root File.expand_path("templates", __dir__)
3
-
4
- desc "Configure necessary files to use RailsOptions"
5
-
6
- def create_migration
7
- rake "rails_options:install:migrations"
8
- end
9
- end