watarase 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +156 -0
- data/Rakefile +32 -0
- data/lib/tasks/watarase_tasks.rake +4 -0
- data/lib/watarase.rb +28 -0
- data/lib/watarase/controller.rb +49 -0
- data/lib/watarase/generators/uploader/uploader_generator.rb +45 -0
- data/lib/watarase/model.rb +20 -0
- data/lib/watarase/version.rb +3 -0
- data/test/dummy/Gemfile +40 -0
- data/test/dummy/Gemfile.lock +120 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/rails.png +0 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/javascripts/users.js.coffee +3 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/scaffolds.css.scss +69 -0
- data/test/dummy/app/assets/stylesheets/users.css.scss +3 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/users_controller.rb +80 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/users_helper.rb +5 -0
- data/test/dummy/app/models/user.rb +4 -0
- data/test/dummy/app/models/user_image_holder.rb +18 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/users/_form.html.erb +31 -0
- data/test/dummy/app/views/users/edit.html.erb +6 -0
- data/test/dummy/app/views/users/index.html.erb +31 -0
- data/test/dummy/app/views/users/index.json.jbuilder +4 -0
- data/test/dummy/app/views/users/new.html.erb +5 -0
- data/test/dummy/app/views/users/show.html.erb +10 -0
- data/test/dummy/app/views/users/show.json.jbuilder +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +25 -0
- data/test/dummy/config/boot.rb +6 -0
- data/test/dummy/config/database.yml +60 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +27 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +55 -0
- data/test/dummy/db/migrate/20130316163018_create_users.rb +11 -0
- data/test/dummy/db/migrate/20130318134905_create_user_image_holders.rb +13 -0
- data/test/dummy/db/schema.rb +42 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/log/development.log +6173 -0
- data/test/dummy/log/test.log +4039 -0
- data/test/dummy/public/404.html +27 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/test/controllers/users_controller_test.rb +59 -0
- data/test/dummy/test/fixtures/images/default.png +0 -0
- data/test/dummy/test/fixtures/user_image_holders.yml +22 -0
- data/test/dummy/test/fixtures/users.yml +7 -0
- data/test/dummy/test/helpers/users_helper_test.rb +4 -0
- data/test/dummy/test/models/user_image_holder_test.rb +7 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/dummy/test/test_helper.rb +15 -0
- data/test/dummy/tmp/cache/assets/development/sass/d65fc20612cada6cf950acc42e8249eabf15168c/scaffolds.css.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/d65fc20612cada6cf950acc42e8249eabf15168c/users.css.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/10fcfbe6ebae11a40c8eac41939a1b9a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4ad413f3e3326481d2f5f9327bbd0e12 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/639464835e9b3e69e17ff82198bb49d4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6c0f2a2c7346b84a92e2cb81473e251b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/85ae64edf528ce6e981889f3f3c285d9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/977ead1d20bc9f7e1c191bd4348f9e3a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/981fdf59c6c819da5a85424ee749e704 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/af0b8e0d6ae482cd467cf7ca6cf461ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bd3936370d0f952ada5774e2230046ed +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/be10cf0a459c2397da8192966ed4ae50 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cf0fb9efef3ee1bf2ea2c3e108dee600 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d46c90159d299e62b189c080134dba53 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d5c7928882375575ed61c458a61defcf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/df8b2265598a7cf1f0db49c6169b3031 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e2e8f7f4c2e46b20bbaa95d67e83c41e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e459168835a5f27b832ace20874f7c10 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e7726188d3504b41f9ac5e31d1eedea7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fb009e9fefe26f5f83de37860988c77d +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/d65fc20612cada6cf950acc42e8249eabf15168c/scaffolds.css.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/d65fc20612cada6cf950acc42e8249eabf15168c/users.css.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/10fcfbe6ebae11a40c8eac41939a1b9a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4ad413f3e3326481d2f5f9327bbd0e12 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6c0f2a2c7346b84a92e2cb81473e251b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/85ae64edf528ce6e981889f3f3c285d9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/977ead1d20bc9f7e1c191bd4348f9e3a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/af0b8e0d6ae482cd467cf7ca6cf461ba +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bd3936370d0f952ada5774e2230046ed +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/be10cf0a459c2397da8192966ed4ae50 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cf0fb9efef3ee1bf2ea2c3e108dee600 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d46c90159d299e62b189c080134dba53 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e7726188d3504b41f9ac5e31d1eedea7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fb009e9fefe26f5f83de37860988c77d +0 -0
- data/test/test_helper.rb +27 -0
- data/test/watarase_test.rb +27 -0
- metadata +316 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
Binary file
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,69 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #fff;
|
3
|
+
color: #333;
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
p, ol, ul, td {
|
10
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
11
|
+
font-size: 13px;
|
12
|
+
line-height: 18px;
|
13
|
+
}
|
14
|
+
|
15
|
+
pre {
|
16
|
+
background-color: #eee;
|
17
|
+
padding: 10px;
|
18
|
+
font-size: 11px;
|
19
|
+
}
|
20
|
+
|
21
|
+
a {
|
22
|
+
color: #000;
|
23
|
+
&:visited {
|
24
|
+
color: #666;
|
25
|
+
}
|
26
|
+
&:hover {
|
27
|
+
color: #fff;
|
28
|
+
background-color: #000;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
div {
|
33
|
+
&.field, &.actions {
|
34
|
+
margin-bottom: 10px;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
#notice {
|
39
|
+
color: green;
|
40
|
+
}
|
41
|
+
|
42
|
+
.field_with_errors {
|
43
|
+
padding: 2px;
|
44
|
+
background-color: red;
|
45
|
+
display: table;
|
46
|
+
}
|
47
|
+
|
48
|
+
#error_explanation {
|
49
|
+
width: 450px;
|
50
|
+
border: 2px solid red;
|
51
|
+
padding: 7px;
|
52
|
+
padding-bottom: 0;
|
53
|
+
margin-bottom: 20px;
|
54
|
+
background-color: #f0f0f0;
|
55
|
+
h2 {
|
56
|
+
text-align: left;
|
57
|
+
font-weight: bold;
|
58
|
+
padding: 5px 5px 5px 15px;
|
59
|
+
font-size: 12px;
|
60
|
+
margin: -7px;
|
61
|
+
margin-bottom: 0px;
|
62
|
+
background-color: #c00;
|
63
|
+
color: #fff;
|
64
|
+
}
|
65
|
+
ul li {
|
66
|
+
font-size: 12px;
|
67
|
+
list-style: square;
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
class UsersController < ApplicationController
|
2
|
+
image_loadable :user
|
3
|
+
|
4
|
+
before_action :set_user, only: [:show, :edit, :update, :destroy]
|
5
|
+
|
6
|
+
# GET /users
|
7
|
+
# GET /users.json
|
8
|
+
def index
|
9
|
+
@users = User.all
|
10
|
+
end
|
11
|
+
|
12
|
+
# GET /users/1
|
13
|
+
# GET /users/1.json
|
14
|
+
def show
|
15
|
+
end
|
16
|
+
|
17
|
+
# GET /users/new
|
18
|
+
def new
|
19
|
+
@user = User.new
|
20
|
+
end
|
21
|
+
|
22
|
+
# GET /users/1/edit
|
23
|
+
def edit
|
24
|
+
end
|
25
|
+
|
26
|
+
# POST /users
|
27
|
+
# POST /users.json
|
28
|
+
def create
|
29
|
+
@user = User.new(user_params)
|
30
|
+
set_image_holder @user
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
if @user.save
|
34
|
+
format.html { redirect_to @user, notice: 'User was successfully created.' }
|
35
|
+
format.json { render action: 'show', status: :created, location: @user }
|
36
|
+
else
|
37
|
+
format.html { render action: 'new' }
|
38
|
+
format.json { render json: @user.errors, status: :unprocessable_entity }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# PATCH/PUT /users/1
|
44
|
+
# PATCH/PUT /users/1.json
|
45
|
+
def update
|
46
|
+
|
47
|
+
set_image_holder @user
|
48
|
+
|
49
|
+
respond_to do |format|
|
50
|
+
if @user.update(user_params)
|
51
|
+
format.html { redirect_to @user, notice: 'User was successfully updated.' }
|
52
|
+
format.json { head :no_content }
|
53
|
+
else
|
54
|
+
format.html { render action: 'edit' }
|
55
|
+
format.json { render json: @user.errors, status: :unprocessable_entity }
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# DELETE /users/1
|
61
|
+
# DELETE /users/1.json
|
62
|
+
def destroy
|
63
|
+
@user.destroy
|
64
|
+
respond_to do |format|
|
65
|
+
format.html { redirect_to users_url }
|
66
|
+
format.json { head :no_content }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
# Use callbacks to share common setup or constraints between actions.
|
72
|
+
def set_user
|
73
|
+
@user = User.find(params[:id])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Never trust parameters from the scary internet, only allow the white list through.
|
77
|
+
def user_params
|
78
|
+
params.require(:user).permit(:username)
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class UserImageHolder < ActiveRecord::Base
|
2
|
+
include Magick unless self.include? Magick
|
3
|
+
belongs_to :user, primary_key: :username, foreign_key: :user_username
|
4
|
+
|
5
|
+
def uploaded_image= (image_params)
|
6
|
+
if image_params[:remove_image] && image_params[:remove_image] == "1"
|
7
|
+
self.destroy
|
8
|
+
elsif image_params[:image_file] && !image_params[:image_file].blank?
|
9
|
+
self.filename = image_params[:image_file].original_filename
|
10
|
+
self.content_type = image_params[:image_file].content_type
|
11
|
+
data = image_params[:image_file].tempfile.read
|
12
|
+
self.image_data = Image.from_blob(data).first.resize_to_fit(100, 100).to_blob
|
13
|
+
self.image_thumb = Image.from_blob(data).first.thumbnail(35, 35).to_blob
|
14
|
+
elsif self.new_record?
|
15
|
+
self.destroy
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= form_for(@user) do |f| %>
|
2
|
+
<% if @user.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @user.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :username %><br />
|
16
|
+
<%= f.text_field :username %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :image_file %><br />
|
20
|
+
<%= f.file_field :image_file %>
|
21
|
+
</div>
|
22
|
+
<% unless @user.new_record? %>
|
23
|
+
<div class="field">
|
24
|
+
<%= f.check_box :remove_image %>
|
25
|
+
<%= f.label :remove_image %><br />
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
<div class="actions">
|
29
|
+
<%= f.submit %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<h1>Listing users</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>Username</th>
|
7
|
+
<th>User image id</th>
|
8
|
+
<th>User image</th>
|
9
|
+
<th></th>
|
10
|
+
<th></th>
|
11
|
+
<th></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
|
15
|
+
<tbody>
|
16
|
+
<% @users.each do |user| %>
|
17
|
+
<tr>
|
18
|
+
<td><%= user.username %></td>
|
19
|
+
<td><%= user.user_image_holder.try(:id) %></td>
|
20
|
+
<td><%= image_tag image_thumb_path user if user.user_image_holder %></td>
|
21
|
+
<td><%= link_to 'Show', user %></td>
|
22
|
+
<td><%= link_to 'Edit', edit_user_path(user) %></td>
|
23
|
+
<td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
<br />
|
30
|
+
|
31
|
+
<%= link_to 'New User', new_user_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.extract! @user, :username, :created_at, :updated_at
|
data/test/dummy/bin/rake
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Assets should be precompiled for production (so we don't need the gems loaded then)
|
6
|
+
Bundler.require(*Rails.groups(assets: %w(development test)))
|
7
|
+
|
8
|
+
require "watarase"
|
9
|
+
|
10
|
+
|
11
|
+
module Dummy
|
12
|
+
class Application < Rails::Application
|
13
|
+
# Settings in config/environments/* take precedence over those specified here.
|
14
|
+
# Application configuration should go into files in config/initializers
|
15
|
+
# -- all .rb files in that directory are automatically loaded.
|
16
|
+
|
17
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
18
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
19
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
20
|
+
|
21
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
22
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
23
|
+
# config.i18n.default_locale = :de
|
24
|
+
end
|
25
|
+
end
|