Skip to content

Instantly share code, notes, and snippets.

seiyamaeda seiyamaeda

Block or report user

Report or block seiyamaeda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
seiyamaeda / Gemfille
Last active Apr 3, 2018
Post a message to 'alert' channel in Slack
View Gemfille
gem 'json'
gem 'faye-websocket'
gem 'eventmachine'
gem 'slack-ruby-client'
seiyamaeda / app|controllers|hoges_controller.rb
Last active Apr 3, 2018
Creating text-date, Convert Time Class to String Class
View app|controllers|hoges_controller.rb
class HogesController < ApplicationController
def get_date_text
from = params[:from]
to = params[:to]
wave_dash_text = ' ~ '
get_converted_string_date(from) + wave_dash_text + get_converted_string_date(to)
View app|controllers|concerns|bool_castable.rb
module Concerns
module BoolCastable
extend ActiveSupport::Concern
def cast_to_boolean(value)
seiyamaeda / app|assets|javascripts|application.js
Created Apr 3, 2018
How to use TimePicker in AdminLTE ver2 (with Bootstrap 3.3.6)
View app|assets|javascripts|application.js
//= require admin-lte/plugins/timepicker/bootstrap-timepicker.min
seiyamaeda / app|assets|javascripts|application.js
Last active Apr 3, 2018
How to use DatePicker in AdminLTE ver2 (with Bootstrap 3.3.6)
View app|assets|javascripts|application.js
//= require admin-lte/plugins/datepicker/bootstrap-datepicker
//= require admin-lte/plugins/datepicker/locales/bootstrap-datepicker.ja
seiyamaeda / Gemfile
Last active Apr 3, 2018
How to use 'Cocoon' | Ruby on Rails 5.1.4 | AdminLTE ver2 (with Bootstrap 3.3.6) | Model 'Hoge' and 'Model 'Fuga' are 'one-to-many relationship'
View Gemfile
gem 'cocoon'
gem 'jquery-rails'
seiyamaeda / app|assets|javascripts|
Last active Apr 2, 2018
How to make the disabled-link with CoffeeScript / for Ruby on Rails 5.1.4
View app|assets|javascripts|
$(document).on 'turbolinks:load', ->
do ->
$('.disabled-link').click (e) ->
seiyamaeda / Gemfile
Last active Mar 31, 2018
Kaminari on 'Ruby on Rails 5.1.4'
View Gemfile
gem 'kaminari'
seiyamaeda / app|views|hoges|new.html.slim
Last active Mar 29, 2018
Open modal view on AdminLTE ver2 (with Bootstrap 3.3.6)
View app|views|hoges|new.html.slim
/ the way it uses font awesome
= link_to '#', data: { toggle: 'modal', target: '#hoge-modal' } do
== render partial: 'layouts/shared/modals/hoge'
seiyamaeda / CLI
Last active Apr 6, 2018
Update select box when another one is updated. / E.g. Hoge and Fuga are 'one-to-many relationship', and use a controller 'Piyo' without this association .
View CLI
$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
$ bundle exec rails -v
Rails 5.1.4
You can’t perform that action at this time.