I hereby claim:
- I am the-undefined on github.
- I am undef_find (https://keybase.io/undef_find) on keybase.
- I have a public key whose fingerprint is EB04 6762 4B5F 420E CEDA 609D DB45 DF15 B731 7152
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '4.1.9' |
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'rails', path: '.' |
| module Index | |
| module_function | |
| def call(parent:, search_term:, sort:, direction:) | |
| queries = [ | |
| parent_query(parent), | |
| search_query(search_term), | |
| sort_query(sort, direction) | |
| ] |
| module Index | |
| module_function | |
| def call(parent_filter:, search_term:, sort:, direction:) | |
| queries = [ | |
| filter_query(parent_filter), | |
| search_query(search_term), | |
| sort_query(sort, direction) | |
| ] |
| class Presenter | |
| def user_select_options | |
| view_context.options_from_collection_for_select( | |
| User.all, | |
| :id, | |
| :full_name | |
| ) | |
| end | |
| private |
| class Presenter | |
| include SortableColumns | |
| def sortable_column_heading(text:, attr:, &block) | |
| label = sort_link_text(text, attr) | |
| link_params = sort_link_params(attr) | |
| block.call(label, link_params) | |
| end | |
| $ irb | |
| 001:0> Class.new.initialize | |
| NoMethodError: private method `initialize' called for #<Class:0x007fc9188e3f08> |
| TimeWindow.where(%{EXTRACT(YEAR FROM start_date) = ?}, 2020) |
| # Example of a guard clause performing a nil check | |
| class BlahSpeaker | |
| has_one :audience | |
| def speak | |
| return if audience.nil? | |
| audience.address('blah ' * 100) | |
| end | |
| end |