Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
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
annotate
Commits
7a85f89f
Commit
7a85f89f
authored
Feb 14, 2009
by
Miguel Herranz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write default(FALSE) when the default value for a column is false.
Before this change only default(TRUE) was written.
parent
ed05a78e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
annotate.gemspec
annotate.gemspec
+2
-2
annotate.rb
lib/annotate.rb
+1
-1
annotate_models.rb
lib/annotate/annotate_models.rb
+1
-1
No files found.
annotate.gemspec
View file @
7a85f89f
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
Gem
::
Specification
.
new
do
|
s
|
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
%q{annotate}
s
.
name
=
%q{annotate}
s
.
version
=
"2.2.
5
"
s
.
version
=
"2.2.
6
"
s
.
required_rubygems_version
=
Gem
::
Requirement
.
new
(
">= 0"
)
if
s
.
respond_to?
:required_rubygems_version
=
s
.
required_rubygems_version
=
Gem
::
Requirement
.
new
(
">= 0"
)
if
s
.
respond_to?
:required_rubygems_version
=
s
.
authors
=
[
"Marcos Piccinini"
]
s
.
authors
=
[
"Marcos Piccinini"
]
s
.
date
=
%q{200
8-12-28
}
s
.
date
=
%q{200
9-02-14
}
s
.
default_executable
=
%q{annotate}
s
.
default_executable
=
%q{annotate}
s
.
description
=
%q{Annotates Rails Models and Routes}
s
.
description
=
%q{Annotates Rails Models and Routes}
s
.
email
=
[
"x@nofxx.com"
]
s
.
email
=
[
"x@nofxx.com"
]
...
...
lib/annotate.rb
View file @
7a85f89f
...
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
...
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
$:
.
include?
(
File
.
dirname
(
__FILE__
))
||
$:
.
include?
(
File
.
expand_path
(
File
.
dirname
(
__FILE__
)))
$:
.
include?
(
File
.
dirname
(
__FILE__
))
||
$:
.
include?
(
File
.
expand_path
(
File
.
dirname
(
__FILE__
)))
module
Annotate
module
Annotate
VERSION
=
'2.2.
5
'
VERSION
=
'2.2.
6
'
end
end
begin
begin
...
...
lib/annotate/annotate_models.rb
View file @
7a85f89f
...
@@ -39,7 +39,7 @@ module AnnotateModels
...
@@ -39,7 +39,7 @@ module AnnotateModels
max_size
=
klass
.
column_names
.
collect
{
|
name
|
name
.
size
}.
max
+
1
max_size
=
klass
.
column_names
.
collect
{
|
name
|
name
.
size
}.
max
+
1
klass
.
columns
.
each
do
|
col
|
klass
.
columns
.
each
do
|
col
|
attrs
=
[]
attrs
=
[]
attrs
<<
"default(
#{
quote
(
col
.
default
)
}
)"
if
col
.
default
attrs
<<
"default(
#{
quote
(
col
.
default
)
}
)"
unless
col
.
default
.
nil?
attrs
<<
"not null"
unless
col
.
null
attrs
<<
"not null"
unless
col
.
null
attrs
<<
"primary key"
if
col
.
name
==
klass
.
primary_key
attrs
<<
"primary key"
if
col
.
name
==
klass
.
primary_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