Skip to content

Instantly share code, notes, and snippets.

@Haguilar91
Last active September 16, 2017 06:12
Show Gist options
  • Save Haguilar91/f0978c4e5c9579e45fe54d8724d3b8ca to your computer and use it in GitHub Desktop.
Save Haguilar91/f0978c4e5c9579e45fe54d8724d3b8ca to your computer and use it in GitHub Desktop.
Slick Slider problema con rails.
//= require jquery2
//= require rails-ujs
//= require jquery.slick
//= require initialize
//= require jquery.raty
//= require turbolinks
#La gema de Slick esta en https://github.com/bodrovis/jquery-slick-rails/
#Slick solo es: http://kenwheeler.github.io/slick/
source 'https://rubygems.org'
gem 'carrierwave', '~> 0.10.0'
gem 'carrierwave-imageoptimizer'
gem 'mini_magick'
gem 'omniauth-facebook'
gem 'mysql2'
gem 'figaro'
gem 'turbolinks'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails'
gem 'mailgun-ruby', '~>1.1.6'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc' , group: :doc
gem 'devise'
gem "jquery-slick-rails"
gem 'nokogiri', '~> 1.6', '>= 1.6.7'
# Use ActiveModel has_secure_password
gem 'bcrypt'
gem 'activesupport'
gem 'mailboxer'
gem 'gravatarify', '~> 3.1.1'
# Use jquery as the JavaScript library
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
#gem 'turbolinks'
gem 'bootsnap', require: false
gem 'requirejs-rails'
gem 'erubis'
gem 'haml'
gem 'jquery-rails'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'devise-i18n'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'rake'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
jQuery(document).on 'turbolinks:load', ->
$('.scroller').slick({
dots: true
})
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Compiled and minified CSS -->
</head>
<body>
<% content_for :head do %>
<meta name="turbolinks-cache-control" content="no-cache">
<% end %>
<div class="mdl-cell mdl-cell--10-col mdl-cell--8-col-phone mdl-shadow--2dp" align="center">
<div class="mdl-card__title" align="center">
<h5 class="mdl-card__title-text" align="center">
Reviews de la comunidad
</h5>
</div>
<div class='scroller'>
<% @slider.each do |comment| %>
<div>
<p class="mdl-card__supporting-text mdl-color-text--black">
<%=comment.comentario %>
</p>
<p class="mdl-card__supporting-text mdl-color-text--grey-700">
<%=comment.created_at.strftime("%B %d, %Y")%>
</p>
</div>
<%end%>
</div>
</div>
<div class="mdl-cell mdl-cell--1-col mdl-cell--hide-phone mdl-cell--hide-tablet " >
</div>
</div>
<script >
$('#star').raty();
$('.star-rating').raty({
path: '/assets/',
readOnly: true,
score: function() {
return $(this).attr('data-score');
}
});
</script>
</body>
</html>
def show_another_user
if (params.has_key?(:user_id))
@slider = Comment.all.where(:emailperfil=>User.find_by_id(params[:user_id]).email).order('created_at DESC')
@usuario = User.all.find_by_id(params[:user_id])
else
@buscaruser = User.where("email LIKE :email1 OR nombre LIKE :nombre1 or apellido LIKE :apellido1", {:email1 => "#{params[:search]}%", :nombre1 => "#{params[:search]}%", :apellido1 => "#{params[:search]}%" })
@buscaritem = Item.where("nombre LIKE :nombreitem", {:nombreitem => "#{params[:search]}%" })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment