faalis 0.16.1 → 0.16.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d61d933dd4c3ddbee82cdea09bba326cc90cb4da
|
4
|
+
data.tar.gz: 199548898cd205d7144769fb3c052a6ae4f9783f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d93712db24e85593e8fd0cd909ac568eb4ae978bb2acf9265b27093c3e61e8a70f51f778624d938e7735f2552b10d25542f0a426a87073e322ca80836e8b95e
|
7
|
+
data.tar.gz: 9c737066654c5c2049facc4e20cedf0ab78134dbf0d3640f62b636634520e907e1bd395d72e3f2469754765f83005f85cac38ab8d1ac205abc6d381b4ffb3be5
|
data/app/models/faalis/user.rb
CHANGED
@@ -51,6 +51,14 @@ module Faalis
|
|
51
51
|
|
52
52
|
devise *@@devise_options
|
53
53
|
|
54
|
+
def name
|
55
|
+
"#{first_name} #{last_name}"
|
56
|
+
end
|
57
|
+
|
58
|
+
def full_name
|
59
|
+
name
|
60
|
+
end
|
61
|
+
|
54
62
|
def password_required?
|
55
63
|
# TODO: nil? is not suitable for here we should use empty? or blink?
|
56
64
|
if Devise.omniauth_configs.any?
|
data/lib/faalis/version.rb
CHANGED
@@ -128,6 +128,7 @@ module Faalis
|
|
128
128
|
# PRIVATES --------------------------------------------
|
129
129
|
private
|
130
130
|
|
131
|
+
# Resource parent related ----------------------
|
131
132
|
# check for parent
|
132
133
|
def parent?
|
133
134
|
if options[:parent] != ""
|
@@ -136,6 +137,17 @@ module Faalis
|
|
136
137
|
false
|
137
138
|
end
|
138
139
|
|
140
|
+
# Remove the starting slash from the given parent path
|
141
|
+
def trim_parent_path
|
142
|
+
if parent?
|
143
|
+
options[:parent].gsub(/^\//, "")
|
144
|
+
else
|
145
|
+
""
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# -------------------------
|
150
|
+
|
139
151
|
# Path to the resource
|
140
152
|
def resource_path
|
141
153
|
path_parts = resource_name.split("/")
|
@@ -217,7 +217,8 @@ var <%= resource.pluralize %> = angular.module("<%= resource %>", ["ListView", "
|
|
217
217
|
|
218
218
|
};
|
219
219
|
<% unless options[:no_filter] %>/*<% end %>
|
220
|
-
API.all("<%= resource.pluralize.underscore %>").getList()
|
220
|
+
<% if parent? %>API.one("<%= trim_parent_path %>", <%= options[:parent] %>_id).all("<%= resource.pluralize.underscore %>").getList()<% else %>
|
221
|
+
API.all("<%= resource.pluralize.underscore %>").getList()<% end %>
|
221
222
|
.then(function(data){
|
222
223
|
$scope.<%= resource.pluralize.underscore %> = data;
|
223
224
|
}, function(data){
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faalis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -241,14 +241,14 @@ dependencies:
|
|
241
241
|
requirements:
|
242
242
|
- - ~>
|
243
243
|
- !ruby/object:Gem::Version
|
244
|
-
version: 0.2.
|
244
|
+
version: 0.2.3
|
245
245
|
type: :runtime
|
246
246
|
prerelease: false
|
247
247
|
version_requirements: !ruby/object:Gem::Requirement
|
248
248
|
requirements:
|
249
249
|
- - ~>
|
250
250
|
- !ruby/object:Gem::Version
|
251
|
-
version: 0.2.
|
251
|
+
version: 0.2.3
|
252
252
|
- !ruby/object:Gem::Dependency
|
253
253
|
name: sqlite3
|
254
254
|
requirement: !ruby/object:Gem::Requirement
|
@@ -644,7 +644,6 @@ files:
|
|
644
644
|
- spec/dummy/public/favicon.ico
|
645
645
|
- spec/dummy/config.ru
|
646
646
|
- spec/dummy/README.rdoc
|
647
|
-
- spec/dummy/db/test.sqlite3
|
648
647
|
- spec/dummy/app/views/layouts/application.html.erb
|
649
648
|
- spec/dummy/app/assets/javascripts/application.js
|
650
649
|
- spec/dummy/app/assets/stylesheets/application.css
|
@@ -707,7 +706,6 @@ test_files:
|
|
707
706
|
- spec/dummy/public/favicon.ico
|
708
707
|
- spec/dummy/config.ru
|
709
708
|
- spec/dummy/README.rdoc
|
710
|
-
- spec/dummy/db/test.sqlite3
|
711
709
|
- spec/dummy/app/views/layouts/application.html.erb
|
712
710
|
- spec/dummy/app/assets/javascripts/application.js
|
713
711
|
- spec/dummy/app/assets/stylesheets/application.css
|
data/spec/dummy/db/test.sqlite3
DELETED
File without changes
|