suite
This commit is contained in:
parent
7e4ba83120
commit
31c428a413
10
Gemfile
10
Gemfile
@ -6,9 +6,10 @@ gem 'rails', '4.2.10'
|
|||||||
|
|
||||||
gem 'bcrypt-ruby', '~> 3.0.0'
|
gem 'bcrypt-ruby', '~> 3.0.0'
|
||||||
# Use sqlite3 as the database for Active Record
|
# Use sqlite3 as the database for Active Record
|
||||||
gem 'sqlite3'
|
|
||||||
gem "mysql2", "0.4.10"
|
gem "mysql2", "0.4.10"
|
||||||
|
|
||||||
|
gem "sprockets-rails", "2.3.3"
|
||||||
# Use Uglifier as compressor for JavaScript assets
|
# Use Uglifier as compressor for JavaScript assets
|
||||||
gem 'uglifier', '>= 1.3.0'
|
gem 'uglifier', '>= 1.3.0'
|
||||||
|
|
||||||
@ -18,6 +19,9 @@ gem 'coffee-rails', '~> 4.0.0'
|
|||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', platforms: :ruby
|
# gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
|
gem 'multi_json', '~> 1.11', '>= 1.11.2'
|
||||||
|
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
|
|
||||||
@ -37,7 +41,7 @@ gem 'nokogiri'
|
|||||||
gem 'acts_as_tree'
|
gem 'acts_as_tree'
|
||||||
gem 'formtastic'
|
gem 'formtastic'
|
||||||
|
|
||||||
|
gem "kaminari", "0.16.3"
|
||||||
gem 'kaminari-bootstrap'
|
gem 'kaminari-bootstrap'
|
||||||
|
|
||||||
|
|
||||||
@ -55,7 +59,7 @@ gem 'unicorn'
|
|||||||
|
|
||||||
gem "nokogiri"
|
gem "nokogiri"
|
||||||
|
|
||||||
gem 'kaminari-bootstrap'
|
|
||||||
|
|
||||||
gem 'acts_as_commentable'
|
gem 'acts_as_commentable'
|
||||||
|
|
||||||
|
29
Gemfile.lock
29
Gemfile.lock
@ -85,21 +85,12 @@ GEM
|
|||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
kaminari (1.2.1)
|
kaminari (0.16.3)
|
||||||
activesupport (>= 4.1.0)
|
actionpack (>= 3.0.0)
|
||||||
kaminari-actionview (= 1.2.1)
|
activesupport (>= 3.0.0)
|
||||||
kaminari-activerecord (= 1.2.1)
|
|
||||||
kaminari-core (= 1.2.1)
|
|
||||||
kaminari-actionview (1.2.1)
|
|
||||||
actionview
|
|
||||||
kaminari-core (= 1.2.1)
|
|
||||||
kaminari-activerecord (1.2.1)
|
|
||||||
activerecord
|
|
||||||
kaminari-core (= 1.2.1)
|
|
||||||
kaminari-bootstrap (3.0.1)
|
kaminari-bootstrap (3.0.1)
|
||||||
kaminari (>= 0.13.0)
|
kaminari (>= 0.13.0)
|
||||||
rails
|
rails
|
||||||
kaminari-core (1.2.1)
|
|
||||||
kgio (2.11.3)
|
kgio (2.11.3)
|
||||||
less (2.6.0)
|
less (2.6.0)
|
||||||
commonjs (~> 0.2.7)
|
commonjs (~> 0.2.7)
|
||||||
@ -119,6 +110,7 @@ GEM
|
|||||||
mini_mime (1.1.0)
|
mini_mime (1.1.0)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.4.0)
|
||||||
minitest (5.14.4)
|
minitest (5.14.4)
|
||||||
|
multi_json (1.15.0)
|
||||||
mysql2 (0.4.10)
|
mysql2 (0.4.10)
|
||||||
nokogiri (1.10.10)
|
nokogiri (1.10.10)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
@ -162,11 +154,10 @@ GEM
|
|||||||
sprockets (3.7.2)
|
sprockets (3.7.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
sprockets-rails (3.2.2)
|
sprockets-rails (2.3.3)
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 3.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sqlite3 (1.4.2)
|
|
||||||
ssrf_filter (1.0.7)
|
ssrf_filter (1.0.7)
|
||||||
temple (0.8.2)
|
temple (0.8.2)
|
||||||
therubyracer (0.12.3)
|
therubyracer (0.12.3)
|
||||||
@ -205,14 +196,16 @@ DEPENDENCIES
|
|||||||
htmlentities
|
htmlentities
|
||||||
jbuilder (~> 1.0.1)
|
jbuilder (~> 1.0.1)
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
kaminari (= 0.16.3)
|
||||||
kaminari-bootstrap
|
kaminari-bootstrap
|
||||||
less-rails
|
less-rails
|
||||||
|
multi_json (~> 1.11, >= 1.11.2)
|
||||||
mysql2 (= 0.4.10)
|
mysql2 (= 0.4.10)
|
||||||
nokogiri
|
nokogiri
|
||||||
rails (= 4.2.10)
|
rails (= 4.2.10)
|
||||||
rmagick
|
rmagick
|
||||||
sdoc
|
sdoc
|
||||||
sqlite3
|
sprockets-rails (= 2.3.3)
|
||||||
therubyracer
|
therubyracer
|
||||||
turbolinks
|
turbolinks
|
||||||
twitter-bootstrap-rails
|
twitter-bootstrap-rails
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
#= require ./shared/jquery
|
#= require jquery
|
||||||
#= require ./shared/jquery-ui
|
#= require ./shared/jquery-ui
|
||||||
#= require jquery_ujs
|
#= require jquery_ujs
|
||||||
#= require ./shared/jquery.strings.js
|
#= require ./shared/jquery.strings.js
|
||||||
|
@ -8,7 +8,7 @@ class Article < ActiveRecord::Base
|
|||||||
has_one :block, :as => :blockable
|
has_one :block, :as => :blockable
|
||||||
|
|
||||||
belongs_to :category
|
belongs_to :category
|
||||||
has_many :enabled_comments,:conditions => {:enabled => true}, :source => :comments, :as => :commentable
|
has_many :enabled_comments, -> {where(:enabled => true)}, :source => :comments, :as => :commentable
|
||||||
after_create :after_creation
|
after_create :after_creation
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ class Block < ActiveRecord::Base
|
|||||||
|
|
||||||
belongs_to :blockable, :polymorphic => true
|
belongs_to :blockable, :polymorphic => true
|
||||||
|
|
||||||
has_many :portlets, :order => :position, :dependent => :destroy
|
has_many :portlets, -> {order(:position)}, :dependent => :destroy
|
||||||
accepts_nested_attributes_for :portlets
|
accepts_nested_attributes_for :portlets
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ class Comment < ActiveRecord::Base
|
|||||||
validates :pseudo, :presence => true
|
validates :pseudo, :presence => true
|
||||||
validates :comment, :presence => true
|
validates :comment, :presence => true
|
||||||
|
|
||||||
scope :recents, where("enabled = ?",true ).order("created_at ASC")
|
scope :recents, -> {where("enabled = ?",true ).order("created_at ASC")}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class GalleryContent < ActiveRecord::Base
|
class GalleryContent < ActiveRecord::Base
|
||||||
has_many :gallery_images, :order => :position
|
has_many :gallery_images,-> {order(:position)}
|
||||||
|
|
||||||
has_one :portlet, :as => :content, :dependent => :destroy
|
has_one :portlet, :as => :content, :dependent => :destroy
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Newsletter < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
scope :recents, where("enabled = ?",true ).order("published_at DESC")
|
scope :recents, -> { where("enabled = ?",true ).order("published_at DESC") }
|
||||||
|
|
||||||
scope :between, lambda { |start, stop|
|
scope :between, lambda { |start, stop|
|
||||||
after(start).before(stop)
|
after(start).before(stop)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
class Portfolio < ActiveRecord::Base
|
class Portfolio < ActiveRecord::Base
|
||||||
belongs_to :artwork
|
belongs_to :artwork
|
||||||
has_many :artworks, :order => "position", :dependent => :destroy
|
has_many :artworks, -> {order(:position)}, :dependent => :destroy
|
||||||
|
|
||||||
before_validation do
|
before_validation do
|
||||||
self.slug = self.title.to_slug
|
self.slug = self.title.to_slug
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class TableContent < ActiveRecord::Base
|
class TableContent < ActiveRecord::Base
|
||||||
has_one :portlet, :as => :content, :dependent => :destroy
|
has_one :portlet, :as => :content, :dependent => :destroy
|
||||||
has_many :table_rows, :include => :cel_tables, :order => :position
|
has_many :table_rows, -> {order(:position)}
|
||||||
has_many :cel_tables, :through => :table_rows
|
has_many :cel_tables, :through => :table_rows
|
||||||
|
|
||||||
STYLES = [["avec bordures",1],["sans bordures",2]]
|
STYLES = [["avec bordures",1],["sans bordures",2]]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class TableRow < ActiveRecord::Base
|
class TableRow < ActiveRecord::Base
|
||||||
has_many :cel_tables, :order => :position
|
has_many :cel_tables, -> {order(:position)}
|
||||||
belongs_to :table_content
|
belongs_to :table_content
|
||||||
|
|
||||||
attr_accessor :skip_before_update
|
attr_accessor :skip_before_update
|
||||||
|
@ -76,9 +76,8 @@
|
|||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
|
||||||
=image_tag "smiley.png", :style => "width:20px;"
|
=image_tag "smiley.png", :style => "width:20px;"
|
||||||
|
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||||
# gem 'sqlite3'
|
# gem 'sqlite3'
|
||||||
development:
|
development:
|
||||||
adapter: sqlite3
|
adapter: mysql2
|
||||||
database: db/development.sqlite3
|
encoding: utf8mb4
|
||||||
|
database: vivre_app
|
||||||
pool: 5
|
pool: 5
|
||||||
timeout: 5000
|
username: root
|
||||||
|
host: 127.0.0.1
|
||||||
|
|
||||||
# Warning: The database defined as "test" will be erased and
|
# Warning: The database defined as "test" will be erased and
|
||||||
# re-generated from your development database when you run "rake".
|
# re-generated from your development database when you run "rake".
|
||||||
@ -23,7 +25,7 @@ production:
|
|||||||
encoding: utf8mb4
|
encoding: utf8mb4
|
||||||
database: vivre_app
|
database: vivre_app
|
||||||
pool: 5
|
pool: 5
|
||||||
username: vivre_app
|
username: vivre_app
|
||||||
password: vivre_app
|
password: vivre_app
|
||||||
socket: /var/run/mysqld/mysqld.sock
|
socket: /var/run/mysqld/mysqld.sock
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user