default_name 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.markdown CHANGED
@@ -2,7 +2,8 @@ Default Name
2
2
  ============
3
3
 
4
4
  This gem overwrites the "to_s" method for all models that have attributes named:
5
- name, title, short_name, long_name
5
+
6
+ name, title, short_name, long_name
6
7
 
7
8
  This is handy because largely you have that one main attribute that is representing your model.
8
9
 
@@ -10,18 +11,21 @@ Installation
10
11
  ============
11
12
 
12
13
  To install this gem, add it to your Gemfile
13
- gem 'default_name'
14
+
15
+ gem 'default_name'
14
16
 
15
17
  Usage
16
18
  =====
17
19
  In your controller:
18
- @company = Company.find(1)
19
- @company.name = "Some company"
20
+
21
+ @company = Company.find(1)
22
+ @company.name = "Some company"
20
23
 
21
24
  And in your view:
22
- <%= @company >
25
+
26
+ <%= @company >
23
27
 
24
28
  It will fire "Some company".
25
29
 
26
30
 
27
- Copyright (c) 2013 Tomislav Car, released under the MIT license
31
+ Copyright (c) 2013 Tomislav Car, released under the MIT license
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'default_name'
3
+ s.version = '1.0.1'
4
+ s.date = '2013-02-24'
5
+ s.summary = "Overwrite to_s method for common name attributes"
6
+ s.description = "Overwrite to_s method for attributes named: name, title, short_name, long_name"
7
+ s.authors = ["Tomislav Car"]
8
+ s.email = ["tomislav@infinum.hr"]
9
+ s.homepage = 'https://github.com/infinum/default_name'
10
+
11
+ s.files = `git ls-files`.split("\n")
12
+ end
data/lib/default_name.rb CHANGED
@@ -15,3 +15,4 @@ str
15
15
  end
16
16
  end
17
17
 
18
+ ActiveRecord::Base.class_eval { include DefaultName }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: default_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-24 00:00:00.000000000 Z
12
+ date: 2013-02-24 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ! 'Overwrite to_s method for attributes named: name, title, short_name,
15
15
  long_name'
@@ -20,7 +20,7 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - Readme.markdown
23
- - init.rb
23
+ - default_name.gemspec
24
24
  - lib/default_name.rb
25
25
  homepage: https://github.com/infinum/default_name
26
26
  licenses: []
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  version: '0'
43
43
  requirements: []
44
44
  rubyforge_project:
45
- rubygems_version: 1.8.23
45
+ rubygems_version: 1.8.10
46
46
  signing_key:
47
47
  specification_version: 3
48
48
  summary: Overwrite to_s method for common name attributes
data/init.rb DELETED
@@ -1,3 +0,0 @@
1
- $:.unshift "#{File.dirname(__FILE__)}/lib"
2
- ActiveRecord::Base.class_eval { include DefaultName }
3
-