faalis 2.0.8 → 2.1.0
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
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +15 -9
- data/app/assets/javascripts/faalis/dashboard/application.js.erb +4 -3
- data/app/assets/javascripts/faalis/dashboard/init.js.coffee +1 -1
- data/{spec/dummy/public/favicon.ico → app/assets/javascripts/faalis/dashboard/lib/amd.js.coffee.erb} +0 -0
- data/app/assets/stylesheets/faalis/dashboard/share.scss +5 -0
- data/app/controllers/faalis/assets_controller.rb +6 -0
- data/app/controllers/faalis/dashboard/user_messages_controller.rb +27 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/faalis/group.rb +4 -3
- data/app/models/faalis/permission.rb +2 -2
- data/app/models/faalis/user.rb +1 -7
- data/app/models/faalis/user_message.rb +6 -0
- data/app/policies/faalis/user_message_policy.rb +9 -0
- data/app/policies/faalis/user_policy.rb +1 -1
- data/app/views/faalis/dashboard/resource/edit.html.slim +1 -1
- data/app/views/faalis/dashboard/resource/show.html.slim +1 -2
- data/app/views/faalis/dashboard/shared/_header.html.erb +2 -2
- data/app/views/faalis/dashboard/user_messages/_form.html.slim +0 -0
- data/app/views/faalis/dashboard/user_messages/create.js.erb +0 -0
- data/app/views/faalis/dashboard/user_messages/destroy.js.erb +0 -0
- data/app/views/faalis/dashboard/user_messages/new.html.slim +72 -0
- data/app/views/layouts/faalis/dashboard.html.erb +2 -1
- data/config/locales/faalis.en.yml +2 -1
- data/config/routes.rb +6 -21
- data/db/migrate/20160310105736_create_faalis_user_messages.rb +16 -0
- data/lib/faalis.rb +1 -1
- data/lib/faalis/configuration.rb +79 -52
- data/lib/faalis/dashboard/dsl.rb +1 -0
- data/lib/faalis/dashboard/models/sidebar.rb +42 -16
- data/lib/faalis/dashboard/sections/resource.rb +152 -130
- data/lib/faalis/dashboard/sections/resource_create.rb +1 -3
- data/lib/faalis/engine.rb +7 -5
- data/lib/faalis/orm.rb +5 -5
- data/lib/faalis/version.rb +1 -1
- data/{spec → test}/dummy/README.rdoc +0 -0
- data/{spec → test}/dummy/Rakefile +0 -0
- data/{spec → test}/dummy/app/assets/javascripts/application.js +0 -0
- data/{spec → test}/dummy/app/assets/javascripts/dashboard/application.js +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/dashboard/ltr/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/dashboard/rtl/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/ltr/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/rtl/application.css +0 -0
- data/{spec → test}/dummy/app/controllers/api_controller.rb +0 -0
- data/{spec → test}/dummy/app/controllers/application_controller.rb +0 -0
- data/{spec → test}/dummy/app/controllers/dashboard/application_controller.rb +0 -0
- data/{spec → test}/dummy/app/helpers/application_helper.rb +0 -0
- data/{spec → test}/dummy/app/policies/application_policy.rb +0 -0
- data/{spec → test}/dummy/app/views/layouts/application.html.erb +0 -0
- data/{spec → test}/dummy/bin/bundle +0 -0
- data/{spec → test}/dummy/bin/rails +0 -0
- data/{spec → test}/dummy/bin/rake +0 -0
- data/{spec → test}/dummy/config.ru +0 -0
- data/{spec → test}/dummy/config/application.rb +0 -0
- data/{spec → test}/dummy/config/boot.rb +0 -0
- data/{spec → test}/dummy/config/database.yml +0 -0
- data/{spec → test}/dummy/config/environment.rb +0 -0
- data/{spec → test}/dummy/config/environments/development.rb +0 -0
- data/{spec → test}/dummy/config/environments/production.rb +0 -0
- data/{spec → test}/dummy/config/environments/test.rb +2 -0
- data/{spec → test}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/{spec → test}/dummy/config/initializers/devise.rb +0 -0
- data/{spec → test}/dummy/config/initializers/faalis.rb +0 -0
- data/{spec → test}/dummy/config/initializers/faalis_assets.rb +0 -0
- data/{spec → test}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/{spec → test}/dummy/config/initializers/formstatic.rb +0 -0
- data/{spec → test}/dummy/config/initializers/formtastic.rb +0 -0
- data/{spec → test}/dummy/config/initializers/inflections.rb +0 -0
- data/{spec → test}/dummy/config/initializers/kaminari_config.rb +0 -0
- data/{spec → test}/dummy/config/initializers/mime_types.rb +0 -0
- data/{spec → test}/dummy/config/initializers/secret_token.rb +0 -0
- data/{spec → test}/dummy/config/initializers/session_store.rb +0 -0
- data/{spec → test}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{spec → test}/dummy/config/locales/en.yml +0 -0
- data/{spec → test}/dummy/config/routes.rb +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/{spec → test}/dummy/lib/templates/slim/scaffold/_form.html.slim +0 -0
- data/test/dummy/log/test.log +0 -0
- data/{spec → test}/dummy/public/404.html +0 -0
- data/{spec → test}/dummy/public/422.html +0 -0
- data/{spec → test}/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fabricators/faalis/groups.rb +27 -0
- data/test/fabricators/faalis/permissions.rb +14 -0
- data/test/fabricators/faalis/users.rb +17 -0
- data/test/generators/install_generator_test.rb +84 -0
- data/test/integration/faalis/authentication_test.rb +36 -0
- data/test/integration/faalis/dashboard_test.rb +64 -0
- data/test/test_helper.rb +72 -0
- metadata +291 -150
- metadata.gz.sig +1 -0
- data/app/controllers/faalis/api/v1/conversations_controller.rb +0 -120
- data/app/controllers/faalis/api/v1/groups_controller.rb +0 -71
- data/app/controllers/faalis/api/v1/logs_controller.rb +0 -12
- data/app/controllers/faalis/api/v1/permissions_controller.rb +0 -61
- data/app/controllers/faalis/api/v1/profiles_controller.rb +0 -42
- data/app/controllers/faalis/api/v1/users_controller.rb +0 -75
- data/lib/faalis_application.rb +0 -446
- data/lib/faalis_plugin.rb +0 -477
- data/spec/factories/faalis/groups.rb +0 -31
- data/spec/factories/faalis/permissions.rb +0 -16
- data/spec/factories/faalis/users.rb +0 -23
- data/spec/features/dashboard_spec.rb +0 -36
- data/spec/features/record_not_found_spec.rb +0 -24
- data/spec/features/sign_in_spec.rb +0 -37
- data/spec/generators/install_spec.rb +0 -58
- data/spec/models/faalis/group_spec.rb +0 -32
- data/spec/models/faalis/permission_spec.rb +0 -15
- data/spec/models/faalis/user_spec.rb +0 -100
- data/spec/policies/faalis/admin_only_policy_spec.rb +0 -39
- data/spec/policies/faalis/application_policy_spec.rb +0 -49
- data/spec/spec_helper.rb +0 -89
- data/spec/support/factory_girl.rb +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba34f964b080c021b7c947386f4e863acadf0ed3
|
|
4
|
+
data.tar.gz: c4784d91fc1af62b216e58853126d8b19707b91a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2f6592ce15675664e07c4d0f296afc5e04c0d792e5e6337a368a8bbed25343d44b046cd62bfa3c6d65391f84f535571a3f4bf4e917822d620b0725679fd8c60
|
|
7
|
+
data.tar.gz: f370fafc1f81eee23335a932648837ba56fb6fbe7873b375317a20bda1f177d11590bc7f350c11ce6fe4c08d144e4bab04beceef3668802f9464aa0d9551dfd2
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
ADDED
|
Binary file
|
data/Rakefile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
1
|
import 'docs/guides/Rakefile'
|
|
3
2
|
|
|
4
3
|
begin
|
|
@@ -7,16 +6,16 @@ rescue LoadError
|
|
|
7
6
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
8
7
|
end
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Bundler.setup(ENV['RAILS_ENV'] || :default)
|
|
11
10
|
|
|
12
|
-
APP_RAKEFILE = File.expand_path('../
|
|
11
|
+
APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
|
|
12
|
+
|
|
13
|
+
#load 'rails/tasks/engine.rake'
|
|
13
14
|
load 'rails/tasks/engine.rake'
|
|
15
|
+
load 'rails/tasks/statistics.rake'
|
|
14
16
|
|
|
15
17
|
Bundler::GemHelper.install_tasks
|
|
16
18
|
|
|
17
|
-
require 'rspec/core'
|
|
18
|
-
require 'rspec/core/rake_task'
|
|
19
|
-
|
|
20
19
|
desc "Generate and deploy all docs"
|
|
21
20
|
task docs: ['guides:generate', 'guides:deploy'] do
|
|
22
21
|
pwd = Dir.pwd
|
|
@@ -37,6 +36,13 @@ task docs: ['guides:generate', 'guides:deploy'] do
|
|
|
37
36
|
system("rm -rf /tmp/ruby ")
|
|
38
37
|
end
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
require 'rake/testtask'
|
|
40
|
+
|
|
41
|
+
Rake::TestTask.new(:test) do |t|
|
|
42
|
+
t.libs << 'lib'
|
|
43
|
+
t.libs << 'test'
|
|
44
|
+
t.pattern = 'test/**/*_test.rb'
|
|
45
|
+
t.verbose = false
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
task default: :test
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
//= require jquery
|
|
15
15
|
//= require jquery.turbolinks
|
|
16
16
|
//= require jquery_ujs
|
|
17
|
+
//= require turbolinks
|
|
17
18
|
|
|
18
19
|
// Misc ---------------------------
|
|
19
20
|
//= require sugar/sugar-full.development
|
|
@@ -22,8 +23,8 @@
|
|
|
22
23
|
//= require admin_lte/admin_lte
|
|
23
24
|
//= require nprogress
|
|
24
25
|
//= require nprogress-turbolinks
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
// <% if Faalis::Engine.enabled?(:amd) && defined?(AMD) %>
|
|
27
|
+
//= require amd/amd
|
|
28
|
+
//<% end %>
|
|
27
29
|
//= require_tree ./lib/
|
|
28
30
|
//= require faalis/dashboard/init
|
|
29
|
-
//= require turbolinks
|
data/{spec/dummy/public/favicon.ico → app/assets/javascripts/faalis/dashboard/lib/amd.js.coffee.erb}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module Faalis::Dashboard
|
|
2
|
+
class UserMessagesController < ::Dashboard::ApplicationController
|
|
3
|
+
|
|
4
|
+
engine 'Faalis::Engine'
|
|
5
|
+
|
|
6
|
+
override_views :show, :new
|
|
7
|
+
|
|
8
|
+
def sent
|
|
9
|
+
authorize model
|
|
10
|
+
|
|
11
|
+
fetch_and_set_all
|
|
12
|
+
action_buttons(index_properties)
|
|
13
|
+
|
|
14
|
+
@_tools_buttons = index_properties.tool_buttons || {}
|
|
15
|
+
@resources = @resources.where(sender: current_user)
|
|
16
|
+
|
|
17
|
+
return if _override_views.include? :index
|
|
18
|
+
render 'faalis/dashboard/resource/index'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def index_hook(resource)
|
|
24
|
+
resource = resource.where(reciver: current_user)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/app/models/faalis/group.rb
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
module Faalis
|
|
13
13
|
# **Group** model for **Faalis** platform
|
|
14
|
-
class Group <
|
|
14
|
+
class Group < ORM.proper_base_class
|
|
15
15
|
|
|
16
16
|
# Make this model authorizable
|
|
17
|
-
include
|
|
17
|
+
include Concerns::Authorizable
|
|
18
18
|
|
|
19
19
|
# Define **Group** fields if current ORM was **Mongoid**
|
|
20
|
-
if
|
|
20
|
+
if ORM.mongoid?
|
|
21
21
|
include Mongoid::Document
|
|
22
22
|
include Mongoid::Timestamps
|
|
23
23
|
|
|
@@ -47,6 +47,7 @@ module Faalis
|
|
|
47
47
|
def to_s
|
|
48
48
|
name
|
|
49
49
|
end
|
|
50
|
+
|
|
50
51
|
private
|
|
51
52
|
|
|
52
53
|
def permission_ids
|
data/app/models/faalis/user.rb
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
module Faalis
|
|
27
27
|
# **User** model for **Faalis** platform
|
|
28
|
-
class User <
|
|
28
|
+
class User < ORM.proper_base_class
|
|
29
29
|
|
|
30
30
|
# Define **User** fields if current ORM was Mongoid -----------------------
|
|
31
31
|
if Faalis::ORM.mongoid?
|
|
@@ -50,12 +50,6 @@ module Faalis
|
|
|
50
50
|
# Make this model authorizable
|
|
51
51
|
include Faalis::Concerns::Authorizable
|
|
52
52
|
|
|
53
|
-
# Define **User** fields if current ORM was ActiveRecord-------------------
|
|
54
|
-
if Faalis::ORM.active_record?
|
|
55
|
-
# acts as messageable for mailboxer
|
|
56
|
-
#acts_as_messageable
|
|
57
|
-
end
|
|
58
|
-
|
|
59
53
|
has_and_belongs_to_many :groups, class_name: 'Faalis::Group', uniq: true
|
|
60
54
|
|
|
61
55
|
# Validations
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
.box-footer.hidden-print
|
|
18
18
|
.row
|
|
19
|
-
|
|
20
19
|
.col-sm-2.pull-right
|
|
21
|
-
a.btn.btn-warning.btn-block href=(get_url(@index_route, @engine))
|
|
20
|
+
a.btn.btn-warning.btn-block href=(get_url(@index_route, nil, @engine))
|
|
22
21
|
i class=("fa fa-chevron-#{Faalis::I18n.direction(I18n.locale) == 'ltr' ? 'left' : 'right'}")
|
|
23
22
|
= t('faalis.back')
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<ul class="nav navbar-nav">
|
|
14
14
|
<!-- Messages: style can be found in dropdown.less-->
|
|
15
15
|
<li class="dropdown messages-menu">
|
|
16
|
-
<a href="
|
|
16
|
+
<a href="<%= Faalis::Engine.routes.url_helpers.dashboard_user_messages_path %>" class="dropdown-toggle" data-toggle="dropdown">
|
|
17
17
|
<i class="fa fa-envelope-o"></i>
|
|
18
18
|
<!-- <span class="label label-success">4</span>-->
|
|
19
19
|
</a>
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<!-- Menu Footer-->
|
|
81
81
|
<li class="user-footer">
|
|
82
82
|
<div class="pull-left">
|
|
83
|
-
<a href="#" class="btn btn-
|
|
83
|
+
<a href="#" class="btn btn-primary btn-flat">Profile</a>
|
|
84
84
|
</div>
|
|
85
85
|
<div class="pull-right">
|
|
86
86
|
<a href="<%= faalis.destroy_user_session_path %>" data-method="delete" class="btn btn-default btn-flat"><%= t('sign_out') %></a>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/! Content Wrapper. Contains page content
|
|
2
|
+
.content-wrapper
|
|
3
|
+
/! Content Header (Page header)
|
|
4
|
+
section.content-header
|
|
5
|
+
h1
|
|
6
|
+
| Inbox
|
|
7
|
+
small 13 new messages
|
|
8
|
+
|
|
9
|
+
/! Main content
|
|
10
|
+
section.content
|
|
11
|
+
.row
|
|
12
|
+
.col-md-3.header
|
|
13
|
+
.box.box-solid
|
|
14
|
+
.box-header.with-border
|
|
15
|
+
h3.box-title Labels
|
|
16
|
+
.box-tools
|
|
17
|
+
button.btn.btn-box-tool data-widget="collapse" type="button"
|
|
18
|
+
i.fa.fa-minus
|
|
19
|
+
/! /.box-header
|
|
20
|
+
.box-body.no-padding
|
|
21
|
+
ul.nav.nav-pills.nav-stacked
|
|
22
|
+
li
|
|
23
|
+
a href="#"
|
|
24
|
+
i.fa.fa-circle-o.text-red
|
|
25
|
+
| Important
|
|
26
|
+
li
|
|
27
|
+
a href="#"
|
|
28
|
+
i.fa.fa-circle-o.text-yellow
|
|
29
|
+
| Promotions
|
|
30
|
+
li
|
|
31
|
+
a href="#"
|
|
32
|
+
i.fa.fa-circle-o.text-light-blue
|
|
33
|
+
| Social
|
|
34
|
+
/! /.box-body
|
|
35
|
+
/! /.box
|
|
36
|
+
/! /.col
|
|
37
|
+
.col-md-9
|
|
38
|
+
.box.box-primary
|
|
39
|
+
.box-header.with-border
|
|
40
|
+
h3.box-title Compose New Message
|
|
41
|
+
/! /.box-header
|
|
42
|
+
.box-body
|
|
43
|
+
.form-group
|
|
44
|
+
input.form-control placeholder="To:" /
|
|
45
|
+
.form-group
|
|
46
|
+
input.form-control placeholder="Subject:" /
|
|
47
|
+
.form-group
|
|
48
|
+
textarea#compose-textarea.form-control style=("height: 300px")
|
|
49
|
+
.form-group
|
|
50
|
+
.btn.btn-default.btn-file
|
|
51
|
+
i.fa.fa-paperclip
|
|
52
|
+
| Attachment
|
|
53
|
+
input name="attachment" type="file" /
|
|
54
|
+
p.help-block Max. 32MB
|
|
55
|
+
/! /.box-body
|
|
56
|
+
.box-footer
|
|
57
|
+
.pull-right
|
|
58
|
+
button.btn.bg-navy type="button"
|
|
59
|
+
i.fa.fa-pencil
|
|
60
|
+
| Draft
|
|
61
|
+
button.btn.btn-success style=("margin-left: 5px") type="submit"
|
|
62
|
+
i.fa.fa-envelope-o
|
|
63
|
+
| Send
|
|
64
|
+
button.btn.btn-danger type="reset"
|
|
65
|
+
i.fa.fa-times
|
|
66
|
+
| Discard
|
|
67
|
+
/! /.box-footer
|
|
68
|
+
/! /. box
|
|
69
|
+
/! /.col
|
|
70
|
+
/! /.row
|
|
71
|
+
/! /.content
|
|
72
|
+
/! /.content-wrapper
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<%= stylesheet_link_tag "dashboard/" + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
|
|
9
9
|
<%= javascript_include_tag :modernizr %>
|
|
10
|
+
|
|
10
11
|
<%= javascript_include_tag Faalis::Engine.dashboard_js_manifest %>
|
|
11
12
|
|
|
12
13
|
<%= csrf_meta_tags %>
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
|
18
19
|
<![endif]-->
|
|
19
20
|
</head>
|
|
20
|
-
<body class="skin-blue sidebar-mini sidebar-collapse">
|
|
21
|
+
<body class="skin-blue sidebar-mini sidebar-collapse" data-action="<%= AMD::Engine.amd_module(self) %>">
|
|
21
22
|
<div class="wrapper">
|
|
22
23
|
<%= render 'faalis/dashboard/shared/header' %>
|
|
23
24
|
<%= render 'faalis/dashboard/shared/sidebar' %>
|
|
@@ -58,7 +58,7 @@ en:
|
|
|
58
58
|
|
|
59
59
|
permission:
|
|
60
60
|
permissions: Permissions
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
dashboard:
|
|
63
63
|
users: Users
|
|
64
64
|
groups: Groups
|
|
@@ -68,6 +68,7 @@ en:
|
|
|
68
68
|
updated_successfully: "%{resource} updated successfully."
|
|
69
69
|
removed_successfully: "%{resource} removed successfully."
|
|
70
70
|
saved_successfully: "%{resource} saved successfully."
|
|
71
|
+
user_messages: User Messages
|
|
71
72
|
|
|
72
73
|
new_resource_title: "New %{resource}"
|
|
73
74
|
edit_resource_title: "Edit %{resource}"
|
data/config/routes.rb
CHANGED
|
@@ -26,6 +26,11 @@ Faalis::Engine.routes.draw do
|
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
|
+
resources :user_messages do
|
|
30
|
+
collection do
|
|
31
|
+
get 'sent', to: 'user_messages#sent', as: :sent
|
|
32
|
+
end
|
|
33
|
+
end
|
|
29
34
|
get '', to: '/faalis/dashboard#index', as: 'index'
|
|
30
35
|
get '/404', to: '/faalis/dashboard#not_found', as: 'not_found'
|
|
31
36
|
end
|
|
@@ -34,25 +39,5 @@ Faalis::Engine.routes.draw do
|
|
|
34
39
|
devise_for :users, devise_config
|
|
35
40
|
end
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
# scope Faalis::Engine.dashboard_namespace.to_sym do
|
|
39
|
-
#get '' => 'dashboard#index', :as => 'dashboard'
|
|
40
|
-
# get 'modules' => 'dashboard#modules'
|
|
41
|
-
# end
|
|
42
|
-
|
|
43
|
-
#devise_for :users, devise_config
|
|
44
|
-
#end
|
|
45
|
-
|
|
46
|
-
# match('/users/auth/:provider',
|
|
47
|
-
# constraints: { provider: /#{Devise.omniauth_configs.keys.join("|")}/ },
|
|
48
|
-
# controller: "devise/omniauth_callbacks#passthru",
|
|
49
|
-
# as: :user_omniauth_authorize,
|
|
50
|
-
# via: [:get, :post])
|
|
51
|
-
|
|
52
|
-
# match('/users/auth/:action/callback',
|
|
53
|
-
# constraints: { action: /#{Devise.omniauth_configs.keys.join("|")}/ },
|
|
54
|
-
# controller: 'devise/omniauth_callbacks',
|
|
55
|
-
# as: :user_omniauth_callback,
|
|
56
|
-
# via: [:get, :post])
|
|
57
|
-
|
|
42
|
+
get '/amd/*asset', to: 'assets#finder'
|
|
58
43
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class CreateFaalisUserMessages < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :faalis_user_messages do |t|
|
|
4
|
+
t.integer :sender_id
|
|
5
|
+
t.integer :reciver_id
|
|
6
|
+
t.boolean :read_only
|
|
7
|
+
t.text :content
|
|
8
|
+
t.text :raw_content
|
|
9
|
+
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
add_index :faalis_user_messages, :sender_id
|
|
14
|
+
add_index :faalis_user_messages, :reciver_id
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/faalis.rb
CHANGED
|
@@ -7,13 +7,13 @@ require 'pundit'
|
|
|
7
7
|
require 'slim-rails'
|
|
8
8
|
require 'formtastic'
|
|
9
9
|
require 'kaminari'
|
|
10
|
+
require 'amd'
|
|
10
11
|
|
|
11
12
|
# Faalis Module
|
|
12
13
|
module Faalis
|
|
13
14
|
|
|
14
15
|
end
|
|
15
16
|
|
|
16
|
-
require 'faalis/configuration'
|
|
17
17
|
require 'faalis/engine'
|
|
18
18
|
require 'faalis/orm'
|
|
19
19
|
require 'faalis/concerns'
|