Skip to content

Instantly share code, notes, and snippets.

View Haguilar91's full-sized avatar

Hector Aguilar Herdocia Haguilar91

View GitHub Profile
@Haguilar91
Haguilar91 / item_card.rb
Created July 8, 2021 00:01
Item con OpenGraph
<% title @item.nombre %>
<% meta_tag :title, "#{@item.nombre} /\nL. #{@item.price} | Chunches" %>
<% meta_tag :description, @item.descripcion %>
<% meta_tag :image, @item.imagen %>
<% meta_tag :type, "product" %>
<% meta_tag :url, "http://test.chunch.es/garaje/items/#{@item.id.to_s}" %>
<% meta_tag :appid, "482141061981612" %>
<div class="container-fluid">
version: '2'
networks:
chunchesnet:
services:
webserver:
image: "phusion/passenger-ruby26:latest"
depends_on:
- db1
<% if current_doctor %>
<!--Ficha va aqui-->
<%conversation = current_member.mailbox.conversations.find(params[:id])%>
<div class="jumbotron">
<h1>Informacion de Paciente</h1>
<p>Edad: <%=@user.age%></p>
<p>Resumen del paciente: </p>
<p><%=@user.username%></p>
<p> Ingresar notas: </p>
<% if current_doctor %>
<!--Ficha va aqui-->
<%conversation = current_member.mailbox.conversations.find(params[:id])%>
<div class="jumbotron">
<h1>Informacion de Paciente</h1>
<p>Edad: <%=@user.age%></p>
<p>Resumen del paciente: </p>
<p><%=@user.username%></p>
<p> Ingresar notas: </p>
<% if current_doctor %>
<!--Ficha va aqui-->
<div class="jumbotron">
<h1>Informacion de Paciente</h1>
<p>Edad: <%=@user.age%></p>
<p>Resumen del paciente: </p>
<p><%=@user.username%></p>
<p> Ingresar notas: </p>
<div class="container">
@Haguilar91
Haguilar91 / accesible.rb
Created December 6, 2019 14:58
Action Cable with Devise and Mailboxer for realtime chat
module Accessible
extend ActiveSupport::Concern
included do
before_action :check_user
end
protected
def check_user
if current_doctor
flash.clear
# == Schema Information
#
# Table name: chats
#
# id :bigint not null, primary key
# message :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# room_id :integer
# user_id :string(255)
class ChatsController < ApplicationController
def new
@chat = Chat.new
end
def index
@chat = Chat.new
@room = Room.new
end
int acum_help=0;
int acum_unhelp=0;
int question_id=0;
int question_id_starter=0;
for (int i = 0 ;i < table.rowlength; i++ )
if(i=0)
question_id_starter = row.question_id
endif
if (row.is_useful = 1)&& (question_id_starter==row.questionid)
@Haguilar91
Haguilar91 / show_another_user.html.erb
Created July 28, 2019 23:32
Ayuda con Turbolinks slider
<script>
$('#star').raty();
$('.star-rating').raty({
path: '/images/black',
readOnly: true,
score: function() {
return $(this).attr('data-score');
}
});
</script>