sequel-crushyform 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/sequel_crushyform.rb +2 -2
- data/sequel-crushyform.gemspec +1 -1
- data/test/spec_crushyform.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
data/lib/sequel_crushyform.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module ::Sequel::Plugins::Crushyform
|
2
2
|
|
3
3
|
module ClassMethods
|
4
|
-
def crushyform_version; [0,0,
|
4
|
+
def crushyform_version; [0,0,7]; end
|
5
5
|
# Schema
|
6
6
|
def crushyform_schema
|
7
7
|
@crushyform_schema ||= default_crushyform_schema
|
@@ -132,7 +132,7 @@ module ::Sequel::Plugins::Crushyform
|
|
132
132
|
# Which means there could be a colision.
|
133
133
|
def crushyid_for(col); "%s-%s-%s" % [id||'new',self.class.name,col]; end
|
134
134
|
# Used to determine a humanly readable representation of the entry on one line of text
|
135
|
-
def to_label; model.label_column.nil? ? [self.new? ? 'New' : nil, model.human_name, id].compact!.join(' ') : self.__send__(model.label_column).to_s.tr("\n\r", ' '); end
|
135
|
+
def to_label; model.label_column.nil?||self.new? ? [self.new? ? 'New' : nil, model.human_name, id].compact!.join(' ') : self.__send__(model.label_column).to_s.tr("\n\r", ' '); end
|
136
136
|
# Provide a thumbnail for the column
|
137
137
|
def to_thumb(c)
|
138
138
|
current = self.__send__(c)
|
data/sequel-crushyform.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'sequel-crushyform'
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.7"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "A Sequel plugin that helps building forms"
|
6
6
|
s.description = "A Sequel plugin that helps building forms. It basically does them for you so that you can forget about the boring part. The kind of thing which is good to have in your toolbox for building a CMS."
|
data/test/spec_crushyform.rb
CHANGED
@@ -187,7 +187,7 @@ describe 'Crushyform miscellaneous helpers' do
|
|
187
187
|
|
188
188
|
should 'have a label based on Model::label_column' do
|
189
189
|
Author.first.to_label.should=='Bradbury'
|
190
|
-
Author.new
|
190
|
+
Author.new.to_label.should=='New Author'
|
191
191
|
end
|
192
192
|
|
193
193
|
should 'Have a fallback label when label_column is nil' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-crushyform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mickael Riga
|