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
#POST /v1/users/{id}/profile_photo | |
def create | |
user = User.where(_id: params[:id]).first | |
app_decorator = ApplicationDecorator.new(User) | |
if !user.nil? | |
user_decorated = UserDecorator.decorate(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
def convert_base64_image(data, type) | |
io = FileIo.new(Base64.decode64(data)) | |
io.class.class_eval { attr_accessor :original_filename, :content_type } | |
io.original_filename = "photo.jpeg" | |
io.content_type = type | |
self.profile_photo = io | |
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
development: | |
SMTP_USER_NAME: "carlos@platafor.ma" | |
SMTP_PASSWORD: "EJYQLmCDpNe5f7ZhBLcrTA" | |
ADMIN_EMAIL: "luiscarlos@platafor.ma,carlos@platafor.ma,yohan@platafor.ma" | |
BE_ENTER_DOMAIN: "http://localhost:3002/usuarios" | |
SMTP_SERVER: "smtp.mandrillapp.com" | |
SMTP_PORT: 587 | |
ENTER_FACEBOOK_KEY: "210939025732621" | |
ENTER_FACEBOOK_SECRET: "b8224143240a721d451cb2e1d469fff1" | |
ENTER_GOOGLE_OAUTH2_KEY: "882630023452.apps.googleusercontent.com" |
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
ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true): | |
2: | |
3: <p>Someone has requested a link to change your password. You can do this through the link below.</p> | |
4: | |
5: <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p> | |
6: | |
7: <p>If you didn't request this, please ignore this email.</p> | |
8: <p>Your password won't change until you access the link above and create a new one.</p> | |
app/views/devise_mailer/reset_password_instructions.html.erb:5:in `_app_views_devise_mailer_reset_password_instructions_html_erb__1622835222172967092_45847660' | |
app/mailers/devise_mailer.rb:10:in `reset_password_instructions' |
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
development: | |
# Configure available database sessions. (required) | |
sessions: | |
# Defines the default session. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: enterco_usuarios_development | |
# Provides the hosts the default session can connect to. Must be an array | |
# of host:port pairs. (required) |
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
development: | |
PLATAFORMA_PROVIDER_KEY: "fd4fb71f70cef06487b6956555008cbea78ac8af14d495f8e4a80f1c13ed6ae1" | |
PLATAFORMA_PROVIDER_SECRET: "899579453b594c6d4ca8a62fa31c9b81c2273fbf823872e5de8b9c687f90cd03" | |
PUSHER_APP_ID: "54601" | |
PUSHER_APP_KEY: "1c61af54102988a24523" | |
PUSHER_APP_SECRET: "ae64e420dca172d3a3a6" | |
OAUTH_SERVER: "http://login.civico.com:3003" | |
SESSION_DOMAIN: ".civico.com" | |
CACHE_HOST: "localhost:11211" |
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
{ | |
"metadata": { | |
"resultset": { | |
"limit": 10, | |
"offset": 1 | |
} | |
}, | |
"cards": [ | |
{ … }, |
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
development: | |
PLATAFORMA_PROVIDER_KEY: "fd4fb71f70cef06487b6956555008cbea78ac8af14d495f8e4a80f1c13ed6ae1" | |
PLATAFORMA_PROVIDER_SECRET: "899579453b594c6d4ca8a62fa31c9b81c2273fbf823872e5de8b9c687f90cd03" | |
PUSHER_APP_ID: "" | |
PUSHER_APP_KEY: "" | |
PUSHER_APP_SECRET: "" | |
OAUTH_SERVER: "http://login.civico.com:3003" | |
SESSION_DOMAIN: ".civico.com" | |
CACHE_HOST: "localhost:11211" | |
GOOGLE_KEY: |
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
image = place.images.first | |
if !image.nil? | |
image_url = image.file.url(:middle) | |
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
{ | |
"metadata":{ | |
"resultset":{ | |
"limit":10, | |
"offset":1 | |
} | |
}, | |
"cards":[ | |
{ | |
"card_type":"note", |
OlderNewer