simple_show_helper 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +7 -7
  2. data/VERSION +1 -1
  3. data/lib/simple_show_helper.rb +6 -6
  4. metadata +10 -10
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- simple_show_helper
1
+ simple\_show\_helper
2
2
  =======
3
3
 
4
4
  Why?
@@ -7,32 +7,32 @@ Why?
7
7
  It is intended to use with new Rails+Bootstrap apps to create as fast as possible 'show' pages.
8
8
  You only have to add one line to view which will describe model instance + it references.
9
9
 
10
- I use this tool here https://github.com/akwiatkowski/waypoint_manager/blob/master/app/views/areas/show.html.haml
10
+ I use this tool here [https://github.com/akwiatkowski/waypoint_manager/blob/master/app/views/areas/show.html.haml](https://github.com/akwiatkowski/waypoint_manager/blob/master/app/views/areas/show.html.haml)
11
11
 
12
12
  How to?
13
13
  -----
14
14
 
15
15
  Add line in view
16
16
 
17
- = simple_model_details(User.first)
17
+ > = raw simple_show_helper(User.first)
18
18
 
19
19
  Keep in mind that it uses only locales in format for example: 'en.user.email'
20
20
 
21
21
  Custom attributes:
22
22
 
23
- simple_model_details(User.first, attrs: ["email", "name"])
23
+ > = raw simple_show_helper(User.first, attrs: ["email", "name"])
24
24
 
25
25
  Add created_at, updated_at attributes:
26
26
 
27
- simple_model_details(User.first, timestamps: true)
27
+ > = raw simple_show_helper(User.first, timestamps: true)
28
28
 
29
29
  Custom table class, for not Bootstrap users:
30
30
 
31
- simple_model_details(User.first, table_class: "table")
31
+ > = raw simple_show_helper(User.first, table_class: "table")
32
32
 
33
33
  All options example:
34
34
 
35
- raw simple_model_details(resource, attrs: ["name"], timestamps: true, table_class: "table")
35
+ > = raw simple_show_helper(resource, attrs: ["name"], timestamps: true, table_class: "table")
36
36
 
37
37
 
38
38
  Spec, tests, ...
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -1,22 +1,22 @@
1
1
  module ApplicationHelper
2
2
  # Usage:
3
3
  # use in view with bootstrap
4
- # = simple_model_details(User.first)
4
+ # = simple_show_helper(User.first)
5
5
  #
6
6
  # Keep in mind:
7
7
  # * it uses only locales in format like this 'en.user.email'
8
8
  #
9
9
  # Custom attributes:
10
- # = simple_model_details(User.first, attrs: ["email", "name"])
10
+ # = simple_show_helper(User.first, attrs: ["email", "name"])
11
11
  # Add created_at, updated_at:
12
- # = simple_model_details(User.first, timestamps: true)
12
+ # = simple_show_helper(User.first, timestamps: true)
13
13
  # Custom table class
14
- # = simple_model_details(User.first, table_class: "table")
14
+ # = simple_show_helper(User.first, table_class: "table")
15
15
  #
16
16
  # Example:
17
- #= raw simple_model_details(resource, attrs: ["name"], timestamps: true, table_class: "table")
17
+ #= raw simple_show_helper(resource, attrs: ["name"], timestamps: true, table_class: "table")
18
18
 
19
- def simple_model_details(m, options = { })
19
+ def simple_show_helper(m, options = { })
20
20
  if options[:table_class]
21
21
  table_class = options[:table_class]
22
22
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_show_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &28397880 !ruby/object:Gem::Requirement
16
+ requirement: &20354140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.3.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *28397880
24
+ version_requirements: *20354140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &28395680 !ruby/object:Gem::Requirement
27
+ requirement: &20353580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *28395680
35
+ version_requirements: *20353580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &28395160 !ruby/object:Gem::Requirement
38
+ requirement: &20353060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *28395160
46
+ version_requirements: *20353060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: simplecov
49
- requirement: &28394620 !ruby/object:Gem::Requirement
49
+ requirement: &20352540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *28394620
57
+ version_requirements: *20352540
58
58
  description: Simple helper to create 'show' pages easily.
59
59
  email: bobikx@poczta.fm
60
60
  executables: []
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  segments:
87
87
  - 0
88
- hash: 587519105097511732
88
+ hash: 50637960428732025
89
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  none: false
91
91
  requirements: