flexirails 0.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 +7 -0
- data/LICENSE +20 -0
- data/README.md +171 -0
- data/Rakefile +39 -0
- data/app/assets/stylesheets/flexirails.scss +55 -0
- data/app/helpers/flexirails_helper.rb +25 -0
- data/app/models/flexirails/array_view.rb +17 -0
- data/app/models/flexirails/view.rb +123 -0
- data/app/views/flexirails/_container.html.erb +28 -0
- data/app/views/flexirails/_navigation.html.erb +66 -0
- data/lib/flexirails.rb +5 -0
- data/lib/flexirails/engine.rb +4 -0
- data/lib/flexirails/version.rb +3 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.scss +7 -0
- data/test/dummy/app/controllers/active_record_controller.rb +70 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/static_controller.rb +68 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/active_record_view.rb +23 -0
- data/test/dummy/app/models/person.rb +2 -0
- data/test/dummy/app/models/static.rb +5 -0
- data/test/dummy/app/models/static_view.rb +5 -0
- data/test/dummy/app/views/active_record/index.html.erb +7 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/static/index.html.erb +7 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +44 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +8 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/de.yml +8 -0
- data/test/dummy/config/locales/en.yml +8 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20131109204431_create_people.rb +9 -0
- data/test/dummy/db/schema.rb +23 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +5482 -0
- data/test/dummy/log/test.log +4932 -0
- data/test/dummy/public/404.html +26 -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/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/development/sass/62614c0f166e45da36cfbb2781f9667e47799670/application.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/9178b5a65ff97d4c91c8e2380e5ac8d8eb939b91/flexirails.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b2a814b45c3cca5078e8af8655d3f89a5f705998/flexirails.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/e91bee6f7bc4c18550721ba1f2d7361da7e3d2e5/application.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/24585794383ac6ae2640d6c9e4affdbd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2edad7c2ee0e34d5988da78ef799ca6c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2ef811475ef30c8afbab72317974e714 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/33fea692ac14771a738e10ee5d76ae96 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/352bab412d75fa19d0a07504553b59df +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5584751febc87e8b2ba4b7f38285eceb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/69e627a9d109212088a08e7938543d9d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6e1bd95023705b5529e7ccc754a02867 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/836b5f0381caa8a96cebbee674df2708 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/85c3b8d54510866ae2cc33aedc247eb0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/889b9afc807369ef171867cb782dd99c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/92613a75279536c4bcf4f3ba6cfde494 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c0f4ca569d58f951461e6ccadfdd2649 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dcea77c9b7315ca8f48eb8357e38a219 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e714eeaf481f5a44ddca306c4a9c7137 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/9178b5a65ff97d4c91c8e2380e5ac8d8eb939b91/flexirails.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/e91bee6f7bc4c18550721ba1f2d7361da7e3d2e5/application.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2ef811475ef30c8afbab72317974e714 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/352bab412d75fa19d0a07504553b59df +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5584751febc87e8b2ba4b7f38285eceb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6e1bd95023705b5529e7ccc754a02867 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/836b5f0381caa8a96cebbee674df2708 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/85c3b8d54510866ae2cc33aedc247eb0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/889b9afc807369ef171867cb782dd99c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/92613a75279536c4bcf4f3ba6cfde494 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c0f4ca569d58f951461e6ccadfdd2649 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/models/flexirails/array_view_test.rb +44 -0
- data/test/models/flexirails/view_test.rb +46 -0
- data/test/rails-localization-engine_test.rb +7 -0
- data/test/test_helper.rb +14 -0
- data/test/views/flexirails/navigation_test.rb +65 -0
- metadata +306 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="flexirails-container">
|
|
2
|
+
<div class="flexirails">
|
|
3
|
+
<table class="<%= table_class %>">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<%- view.columns.each do |column| -%>
|
|
7
|
+
<th data-attribute="<%= column %>">
|
|
8
|
+
<%- if view.sortable_columns.include?(column) %>
|
|
9
|
+
<%= link_to view.t(column), url_batch_plumb({"pagination.order" => column, "pagination.direction" => view.next_pagination_direction(column)}) %>
|
|
10
|
+
<%- else -%>
|
|
11
|
+
<%= view.t(column) %>
|
|
12
|
+
<%- end %>
|
|
13
|
+
</th>
|
|
14
|
+
<%- end -%>
|
|
15
|
+
</tr>
|
|
16
|
+
</thead>
|
|
17
|
+
<tbody>
|
|
18
|
+
<%- view.rows.each do |row| -%>
|
|
19
|
+
<tr class="flexirow row-<%= row.id %>">
|
|
20
|
+
<%- view.columns.each do |column| %>
|
|
21
|
+
<td><%= view.render_column column, row, self %></td>
|
|
22
|
+
<%- end -%>
|
|
23
|
+
</tr>
|
|
24
|
+
<%- end -%>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<nav class="flexirails">
|
|
2
|
+
<div class="results">
|
|
3
|
+
<span class="total_results">
|
|
4
|
+
<%= view.total %>
|
|
5
|
+
</span>
|
|
6
|
+
<%= I18n.t(:'flexirails.results') %>,
|
|
7
|
+
<div><%= I18n.t(:'flexirails.navigation.per_page') %></div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<select id="per_page" name="per_page" onchange="url = $(this).find('option:selected').attr('data-url'); ('Turbolinks' in window) ? Turbolinks.visit(url) : window.location = url; return false;">
|
|
12
|
+
<option value="5" <%= view.per_page == 5 ? 'selected' : '' %> data-url="<%= url_plumb("pagination.per_page", 5) %>">
|
|
13
|
+
5
|
|
14
|
+
</option>
|
|
15
|
+
<option value="25" <%= view.per_page == 25 ? 'selected' : '' %> data-url="<%= url_plumb("pagination.per_page", 25) %>">
|
|
16
|
+
25
|
|
17
|
+
</option>
|
|
18
|
+
<option value="50" <%= view.per_page == 50 ? 'selected' : '' %> data-url="<%= url_plumb("pagination.per_page", 50) %>">
|
|
19
|
+
50
|
|
20
|
+
</option>
|
|
21
|
+
<option value="100" <%= view.per_page == 100 ? 'selected' : '' %> data-url="<%= url_plumb("pagination.per_page", 100) %>">
|
|
22
|
+
100
|
|
23
|
+
</option>
|
|
24
|
+
<option value="250" <%= view.per_page == 250 ? 'selected' : '' %> data-url="<%= url_plumb("pagination.per_page", 250) %>">
|
|
25
|
+
250
|
|
26
|
+
</option>
|
|
27
|
+
</select>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="pagination">
|
|
31
|
+
<%= link_to url_plumb("pagination.current_page", nil), :class => "first" do %>
|
|
32
|
+
<span>
|
|
33
|
+
<%= raw pagination_first_icon %>
|
|
34
|
+
</span>
|
|
35
|
+
<%- end -%>
|
|
36
|
+
<%= link_to view.has_prev_path ? url_plumb("pagination.current_page", view.current_page - 1) : url_plumb("pagination.current_page", nil), :class => "prev" do %>
|
|
37
|
+
<span>
|
|
38
|
+
<%= raw pagination_prev_icon %>
|
|
39
|
+
</span>
|
|
40
|
+
<%- end -%>
|
|
41
|
+
|
|
42
|
+
<div class="page">
|
|
43
|
+
<span>
|
|
44
|
+
<%= I18n.t(:'flexirails.navigation.page') %>
|
|
45
|
+
</span>
|
|
46
|
+
<input name="current_page_box" type="text" value="<%= view.current_page %>" onchange="url = $(this).data('changeUrl').replace('XX', $(this).val()); ('Turbolinks' in window) ? Turbolinks.visit(url) : window.location = url; return false;" data-change-url="<%= url_plumb("pagination.current_page", 'XX') %>" id="current_page">
|
|
47
|
+
<span>
|
|
48
|
+
<%= I18n.t(:'flexirails.navigation.of') %>
|
|
49
|
+
</span>
|
|
50
|
+
<span class="to">
|
|
51
|
+
<%= view.total_page_count %>
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<%= link_to view.has_next_path ? url_plumb("pagination.current_page", view.current_page + 1) : url_plumb("pagination.current_page", view.total_page_count), :class => "next" do %>
|
|
56
|
+
<span>
|
|
57
|
+
<%= raw pagination_next_icon %>
|
|
58
|
+
</span>
|
|
59
|
+
<%- end -%>
|
|
60
|
+
<%= link_to url_plumb("pagination.current_page", view.total_page_count), :class => "last" do %>
|
|
61
|
+
<span>
|
|
62
|
+
<%= raw pagination_last_icon %>
|
|
63
|
+
</span>
|
|
64
|
+
<%- end -%>
|
|
65
|
+
</div>
|
|
66
|
+
</nav>
|
data/lib/flexirails.rb
ADDED
data/test/dummy/Rakefile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
4
|
+
|
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
|
6
|
+
|
|
7
|
+
Dummy::Application.load_tasks
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
5
|
+
// the compiled file.
|
|
6
|
+
//
|
|
7
|
+
//= require jquery
|
|
8
|
+
//= require jquery_ujs
|
|
9
|
+
//= require_tree .
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
class ActiveRecordController < ApplicationController
|
|
2
|
+
before_filter :populate_database
|
|
3
|
+
|
|
4
|
+
def index
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
protected
|
|
8
|
+
def ar_view
|
|
9
|
+
@ar_view ||= ActiveRecordView.new(params)
|
|
10
|
+
end
|
|
11
|
+
helper_method :ar_view
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
def populate_database
|
|
15
|
+
if Person.count == 0
|
|
16
|
+
[["Delcie", "Pounds"],
|
|
17
|
+
["Charles", "Burtch"],
|
|
18
|
+
["Hayden", "Paterno"],
|
|
19
|
+
["Nery", "Vanwingerden"],
|
|
20
|
+
["Janey", "Leachman"],
|
|
21
|
+
["Sharda", "Rierson"],
|
|
22
|
+
["Inga", "Wilt"],
|
|
23
|
+
["Gertie", "Bannister"],
|
|
24
|
+
["Gladys", "Callery"],
|
|
25
|
+
["Roxanne", "Jeong"],
|
|
26
|
+
["Tamiko", "Cumberbatch"],
|
|
27
|
+
["Glady", "Haakenson"],
|
|
28
|
+
["Roxana", "Persons"],
|
|
29
|
+
["Zofia", "Linebaugh"],
|
|
30
|
+
["Susannah", "Laduke"],
|
|
31
|
+
["Huong", "Bass"],
|
|
32
|
+
["Kelsi", "Conine"],
|
|
33
|
+
["Petronila", "Epping"],
|
|
34
|
+
["Nakesha", "Crace"],
|
|
35
|
+
["Johnette", "Holsinger"],
|
|
36
|
+
["Richie", "Fairchild"],
|
|
37
|
+
["Page", "Abdul"],
|
|
38
|
+
["Elyse", "Romaine"],
|
|
39
|
+
["Zandra", "Vitela"],
|
|
40
|
+
["Shantelle", "Vandam"],
|
|
41
|
+
["Boris", "Sales"],
|
|
42
|
+
["Buck", "Yadon"],
|
|
43
|
+
["Shizue", "Henery"],
|
|
44
|
+
["Eleni", "Mckay"],
|
|
45
|
+
["Anjelica", "Setzer"],
|
|
46
|
+
["Rosamaria", "Snead"],
|
|
47
|
+
["Millie", "Predmore"],
|
|
48
|
+
["Erline", "Masden"],
|
|
49
|
+
["Fran", "Laughridge"],
|
|
50
|
+
["Tish", "Herrmann"],
|
|
51
|
+
["Pok", "Fitzmaurice"],
|
|
52
|
+
["Colette", "Benner"],
|
|
53
|
+
["Libby", "Hyman"],
|
|
54
|
+
["Hellen", "Choi"],
|
|
55
|
+
["Tyson", "Howard"],
|
|
56
|
+
["Beatriz", "Loy"],
|
|
57
|
+
["Cristine", "Dexter"],
|
|
58
|
+
["Yetta", "Freitag"],
|
|
59
|
+
["Lilliam", "Mcgowin"],
|
|
60
|
+
["Leonel", "Simpler"],
|
|
61
|
+
["Alleen", "Mulford"],
|
|
62
|
+
["Giuseppe", "Secord"],
|
|
63
|
+
["Risa", "Patel"],
|
|
64
|
+
["Ryann", "Pool"],
|
|
65
|
+
["Geneva", "Sipe"]].each do |(firstname, lastname)|
|
|
66
|
+
Person.create(firstname: firstname, lastname: lastname)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
class StaticController < ApplicationController
|
|
2
|
+
def index
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
protected
|
|
6
|
+
def static_view
|
|
7
|
+
@static_view ||= StaticView.new(params, items)
|
|
8
|
+
end
|
|
9
|
+
helper_method :static_view
|
|
10
|
+
|
|
11
|
+
def items
|
|
12
|
+
index = 0
|
|
13
|
+
[
|
|
14
|
+
"Laura",
|
|
15
|
+
"Edie",
|
|
16
|
+
"Nicolasa",
|
|
17
|
+
"Celinda",
|
|
18
|
+
"Emeline",
|
|
19
|
+
"Dorcas",
|
|
20
|
+
"Josette",
|
|
21
|
+
"Sharell",
|
|
22
|
+
"Carmela",
|
|
23
|
+
"Lou",
|
|
24
|
+
"Felicitas",
|
|
25
|
+
"Stefany",
|
|
26
|
+
"Gidget",
|
|
27
|
+
"Rafaela",
|
|
28
|
+
"Shirlene",
|
|
29
|
+
"Luna",
|
|
30
|
+
"Angila",
|
|
31
|
+
"Pauline",
|
|
32
|
+
"Elba",
|
|
33
|
+
"Maritza",
|
|
34
|
+
"Donte",
|
|
35
|
+
"Clemente",
|
|
36
|
+
"Nella",
|
|
37
|
+
"Delaine",
|
|
38
|
+
"Clark",
|
|
39
|
+
"Majorie",
|
|
40
|
+
"Lance",
|
|
41
|
+
"Tomi",
|
|
42
|
+
"Fidel",
|
|
43
|
+
"Ettie",
|
|
44
|
+
"Claribel",
|
|
45
|
+
"Kylee",
|
|
46
|
+
"Antonietta",
|
|
47
|
+
"Dan",
|
|
48
|
+
"Love",
|
|
49
|
+
"Kandra",
|
|
50
|
+
"Shantell",
|
|
51
|
+
"Matt",
|
|
52
|
+
"Inge",
|
|
53
|
+
"Isaura",
|
|
54
|
+
"Cameron",
|
|
55
|
+
"Elana",
|
|
56
|
+
"Stanton",
|
|
57
|
+
"Tiara",
|
|
58
|
+
"Jeana",
|
|
59
|
+
"Daina",
|
|
60
|
+
"Nikki",
|
|
61
|
+
"Shondra",
|
|
62
|
+
"Chelsey",
|
|
63
|
+
"Jarret"
|
|
64
|
+
].map { |name|
|
|
65
|
+
Static.new(index += 1, name)
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class ActiveRecordView < Flexirails::View
|
|
2
|
+
def query offset, limit
|
|
3
|
+
scope = if order_results?
|
|
4
|
+
Person.order("#{order} #{direction}")
|
|
5
|
+
else
|
|
6
|
+
Person
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
scope.offset(offset).limit(limit)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def total
|
|
13
|
+
Person.count
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def sortable_columns
|
|
17
|
+
%w(id firstname lastname)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def columns
|
|
21
|
+
sortable_columns
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
require 'rails/all'
|
|
4
|
+
|
|
5
|
+
Bundler.require
|
|
6
|
+
|
|
7
|
+
module Dummy
|
|
8
|
+
class Application < Rails::Application
|
|
9
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
10
|
+
# Application configuration should go into files in config/initializers
|
|
11
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
12
|
+
|
|
13
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
|
14
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
|
15
|
+
|
|
16
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
|
17
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
|
18
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
|
19
|
+
|
|
20
|
+
# Activate observers that should always be running.
|
|
21
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
|
22
|
+
|
|
23
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
24
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
25
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
26
|
+
|
|
27
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
28
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
29
|
+
# config.i18n.default_locale = :de
|
|
30
|
+
|
|
31
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
|
32
|
+
config.encoding = "utf-8"
|
|
33
|
+
|
|
34
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
|
35
|
+
config.filter_parameters += [:password]
|
|
36
|
+
|
|
37
|
+
# Enable the asset pipeline
|
|
38
|
+
config.assets.enabled = true
|
|
39
|
+
|
|
40
|
+
# Version of your assets, change this if you want to expire all your assets
|
|
41
|
+
config.assets.version = '1.0'
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
# gem install sqlite3
|
|
3
|
+
#
|
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
+
# gem 'sqlite3'
|
|
6
|
+
development:
|
|
7
|
+
adapter: sqlite3
|
|
8
|
+
database: db/development.sqlite3
|
|
9
|
+
pool: 5
|
|
10
|
+
timeout: 5000
|
|
11
|
+
|
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
|
13
|
+
# re-generated from your development database when you run "rake".
|
|
14
|
+
# Do not set this db to the same as development or production.
|
|
15
|
+
test:
|
|
16
|
+
adapter: sqlite3
|
|
17
|
+
database: db/test.sqlite3
|
|
18
|
+
pool: 5
|
|
19
|
+
timeout: 5000
|
|
20
|
+
|
|
21
|
+
production:
|
|
22
|
+
adapter: sqlite3
|
|
23
|
+
database: db/production.sqlite3
|
|
24
|
+
pool: 5
|
|
25
|
+
timeout: 5000
|