sixfriedrice.com

...your FileMaker data to Ruby with elegance and speed. Now your Ruby scripts and Rails applications can talk directly to your FileMaker server with a syntax that just feels right...

leadthinking.com

...The idea is to make building desktop apps as simple (and fun) as building Rails websites...

github.com

...end development; execute browser-less, console-based, javascript + DOM code right from within your Rails test suite...

...Always convert to a symbol, otherwise you'll have all kinds of fun. Newer rails / activerecord (at least 5.2) will throw an association names must be a Symbol (ArgumentError) error...

...when you come back to the console later Calls RSpec 1 (spec) in a Rails 2 project and RSpec 2 (rspec) in a Rails 3 project Configures RSpec to use...

gem 'guard', '=1.8.1' gem 'guard-livereload', '=1.4.0', :require => false Notes for Rails 2.3 projects On Rails 2.3, you need to add the middleware like this: # config/environments/development.rb

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows us to use ES6 modules and npm packages (through Yarn...

...put it into app/util and configured application.rb like that: # catches 'invalid %-encoding' error require "#{Rails.root}/app/util/exception_app" config.middleware.insert_before Rack::Runtime, ExceptionApp::Middleware Note: Rails 4.2+ raises an ActionController::BadRequest error...

guides.rubyonrails.org

config.action_controller.action_on_unpermitted_parameters enables logging or raising an exception if parameters that are not explicitly permitted are found. Set to :log or :raise to enable. The default...

...value is :log in development and test environments, and false in all other environments. Rails 3: If you include the strong_params gem, see the Readme for handling unpermitted keys...

Don't insert table rows in a Rails database migration. This will break tests that expect that database to be empty and cause you all sorts of pain.

This card shows how to get a Ruby method touch_device? for your Rails views and a method TouchDevice.isPresent() for your Javascripts. Note that we are detecting touch devices...

makandra dev

You can significantly improve performance by adding this to config/initializers/better_errors: if defined?(BetterErrors) && Rails.env.development? module BetterErrorsHugeInspectWarning def inspect_value(obj) inspected = obj.inspect if inspected.size > 20_000 inspected = "Object was...

...this on the top of your config/schedule.rb: job_type :runner, "cd :path && bundle exec rails runner -e :environment ':task' :output...

...disable it in tests, by adding a body class for tests %body{'data-environment' => Rails.env} overriding the transforms [data-environment="test"] * text-transform: none !important

faviconit.com

...in all needed sizes, formats and with the HTML needed to include them! In Rails applications with Haml: put all the favicon files into /public store the HTML to app/views/layouts/_favicon.html...