What you can do today. Example AOP-isms in Ruby on Rails. Aspect-Oriented Design. The AOP Promise for Tomorrow...
A small library to provide the Rails I18n translations in Javascript clients...
...for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2 and 3 and has an option to ignore shared traits...
...encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory. Or run... tests ...from the geordi gem. This will do the work for you...
This is a bug in Rails 2.3.11 which will be fixed in a future maintenance release. Until then you can copy the attached initializer to config/initializers...
Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I like using cucumber for functional testing so I put together...
delocalize provides localized date/time and number parsing functionality for Rails...
Ruby Rails
...get it working, based off some useful instructions that are tailored for Ruby on Rails...
Or, you can test your Rack application (or Sinatra, or Rails, or Merb) using arbitrary HTTP client libraries, to check interoperability...
...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...
...The idea is to make building desktop apps as simple (and fun) as building Rails websites...
...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...
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...
...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
...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...
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.
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...
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...
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