mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
is_nsfw
This commit is contained in:
parent
4e20af4618
commit
9033e57074
2 changed files with 10 additions and 6 deletions
5
app.rb
5
app.rb
|
@ -20,7 +20,10 @@ end
|
|||
get '/browse' do
|
||||
@current_page = params[:current_page] || 1
|
||||
@current_page = @current_page.to_i
|
||||
site_dataset = Site.order(:updated_at.desc, :hits.desc).filter(is_nsfw: false).filter(is_banned: false).filter(~{updated_at: nil}).paginate(@current_page, 201)
|
||||
site_dataset = Site.order(:updated_at.desc, :hits.desc).filter(is_banned: false).filter(~{updated_at: nil}).paginate(@current_page, 201)
|
||||
|
||||
site_dataset.filter! is_nsfw: (!params[:is_nsfw].nil? ? true : false)
|
||||
|
||||
@page_count = site_dataset.page_count || 1
|
||||
@sites = site_dataset.all
|
||||
slim :browse
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
development:
|
||||
database: 'postgres://localhost/neocities'
|
||||
database: 'postgres://neocities@127.0.0.1/neocities'
|
||||
database_pool: 1
|
||||
session_secret: SETSOMETHINGHERE
|
||||
recaptcha_public_key: ddsfsdfsdf
|
||||
recaptcha_private_key: fsdgfdsdfd
|
||||
phantomjs_url: http://localhost:40000
|
||||
session_secret: SECRET GOES HERE
|
||||
recaptcha_public_key: ENTER PUBLIC KEY HERE
|
||||
recaptcha_private_key: ENTER PRIVATE KEY HERE
|
||||
phantomjs_url:
|
||||
- http://localhost:8910
|
Loading…
Add table
Reference in a new issue