angular_sprinkles 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/angular_sprinkles.gemspec +3 -3
- data/lib/angular_sprinkles/model_decorator.rb +9 -2
- data/spec/dummy/app/views/test/new.html.erb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04613ad621c5fa4d0bbae54eb75509fee2c95d1f
|
4
|
+
data.tar.gz: 47b85137b16c7dcebcad026d3c04a1d403d3b59d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0ee1de35c5ace45a90ec6b66edc1b1571a0777e7a04e1826604e7fd2bedaab722a7ed6b26a47185b61e7eaafad781477addcd68c9505b6e5af2a99a9f8024d
|
7
|
+
data.tar.gz: e8e92bcd7ea5c0fbd03c54b9cd8e1bacb1464ce35fa6edb4e7d77beb337ae08370e0dd5b3bce14d09e9c29178bf31e218bbee99f344881101477e90fa40c92d5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/angular_sprinkles.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: angular_sprinkles 0.1.
|
5
|
+
# stub: angular_sprinkles 0.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "angular_sprinkles"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Gabe Scholz"]
|
14
|
-
s.date = "2014-
|
14
|
+
s.date = "2014-10-03"
|
15
15
|
s.description = "Add a few sprinkles of AngularJS to your Rails App"
|
16
16
|
s.email = "gabe@brewhouse.io"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -4,13 +4,20 @@ module AngularSprinkles
|
|
4
4
|
@key = args.fetch(:key)
|
5
5
|
@json_wrapper = args.fetch(:json_wrapper)
|
6
6
|
@object_wrapper = args.fetch(:object_wrapper)
|
7
|
+
@object = args.fetch(:object)
|
7
8
|
|
8
|
-
|
9
|
-
super(object)
|
9
|
+
super(@object)
|
10
10
|
end
|
11
11
|
|
12
12
|
def bind(attribute = nil)
|
13
13
|
@object_wrapper.new(@key, attribute, @json_wrapper)
|
14
14
|
end
|
15
|
+
|
16
|
+
##
|
17
|
+
# Rails uses #class as a part of #form_for to create labels.
|
18
|
+
# Delegate this method to the model class to prevent this issue.
|
19
|
+
def class
|
20
|
+
@object.class
|
21
|
+
end
|
15
22
|
end
|
16
23
|
end
|
@@ -15,3 +15,10 @@
|
|
15
15
|
<label for="bind">Bind</label>
|
16
16
|
<input id="bind" name="bind" type="text" ng-model="<%= bind(:hello, :world) %>" />
|
17
17
|
</div>
|
18
|
+
|
19
|
+
<%# Rails bug with form_for and simple delegator. %>
|
20
|
+
<%# Add this here to test the work around. %>
|
21
|
+
<%= form_for @model, url: '' do |f| %>
|
22
|
+
<%= f.label :name %>
|
23
|
+
<%= f.text_field :name %>
|
24
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: angular_sprinkles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabe Scholz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|