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
if Rails.env.production? | |
ActionMailer::Base.smtp_settings = { | |
user_name: "username", | |
password: "password", | |
domain: "kole.herokuapp.com", | |
address: "smtp.sendgrid.net", | |
port: 587, | |
authentication: :plain, | |
enable_starttls_auto: 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
// While you can edit this file, it's best to put your changes in | |
// "User/Preferences.sublime-settings", which overrides the settings in here. | |
// | |
// Settings may also be placed in file type specific options files, for | |
// example, in Packages/Python/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform |
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
en el modelo | |
def self.build_survey(current_user) | |
@survey = current_user.surveys.build | |
end | |
y en el controller lo llamas | |
@survey = Survey.build_survey(current_user) |
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
require 'open-uri' | |
require "logger" | |
require 'json' | |
class UpdatePage | |
URL = 'http://www.setbeat.com' | |
REGEX = /playGo.addQueue\((\[{.*\}\])\)/ | |
attr_accessor :urls, :artista |
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
// JPLAYER | |
$(document).ready(function() { | |
$(document).pjax('a',{ | |
container: '[data-pjax-container]', | |
timeout: 5000 | |
}) | |
$('form.navbar-search').submit(function(event) { | |
$.pjax.submit(event, { | |
container: '[data-pjax-container]}', |
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
# config/initializer/paperclip.rb | |
if Rails.env.production? | |
Paperclip::Attachment.default_options[:storage] = :s3 | |
Paperclip::Attachment.default_options[:s3_credentials] = { | |
access_key_id: ENV["ACCSES_KEY_ID"], | |
secret_access_key: ENV['ACCSES_SECRET_KEY'], | |
bucket: ENV['BUCKET'] | |
} | |
Paperclip::Attachment.default_options[:s3_host_alias] = "images.kole.com" | |
end |
NewerOlder