This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Additional translations at https://github.com/heartcombo/devise/wiki/I18n | |
# European Portuguese translations for devise | |
# | |
# The translation does not respect the 1990 agreement | |
pt: | |
devise: | |
confirmations: | |
confirmed: "A sua conta foi confirmada com sucesso." | |
send_instructions: "Dentro de alguns minutos irá receber um e-mail com instruções para confirmar a sua conta." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.js"></script> | |
</head> | |
<body> | |
<div id="timer"></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We need to trigger click event for pagination links and search submit. Also, we need to post | |
# to the entry point when searching, as it will avoid handling the search in 2 different places. | |
# | |
# The submit click event resets the page hidden field. The link event will get the page | |
# number, updates the page hidden field and submits the form. | |
# routes.rb | |
get 'will_paginate', to: 'will_paginate#index' | |
post 'will_paginate', to: 'will_paginate#index' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SessionsController < ApplicationController | |
def create | |
auth = request.env["omniauth.auth"] | |
session[:omniauth] = auth.except('extra') | |
user = User.sign_in_from_omniauth(auth) | |
session[:user_id] = user.id | |
redirect_to root_url, notice: "Signed In" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
gem 'carrierwave', github: 'carrierwaveuploader/carrierwave' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope :category_query, ->(query) do | |
if query.count == 1 | |
joins(:article_categories).where('article_categories.category_id': query.first) | |
else | |
joins(:article_categories). | |
where('article_categories.article_id': ArticleCategory.select('article_categories.article_id') | |
.where(category_id: query) | |
.group('article_categories.article_id') | |
.having("COUNT(article_categories.article_id) > #{query.count - 1}")) | |
.uniq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Users</h1> | |
<%= search_form_for @q, url: dashboard_index_path do |f| %> | |
<%= f.label :name_cont %> | |
<%= f.search_field :name_cont %> | |
<%= f.submit %> | |
<% end %> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express() | |
app.set('view engine', 'pug'); | |
app.set('views','./views'); | |
app.get('/', function (req, res) { | |
var users = []; | |
var mysql = require('mysql') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Some rubocop offenses are an insult to programmers | |
AllCops: | |
TargetRubyVersion: 2.5 | |
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop | |
# to ignore them, so only the ones explicitly set in this file are enabled. | |
DisabledByDefault: true | |
Exclude: | |
- 'db/**/*' |
OlderNewer