Responders gem is really awesome. It sets flash message based on the controller action and resource status allowing you to dry up your Rails controllers. Trailblazer is a thin layer on top of Rails. It gently enforces encapsulation, an intuitive code structure and gives you an object-oriented architecture. When combining both of them together, you […]
Read more at the sourceCategory Archives: gem
Upload Videos Using Carrierwave-video & FFmpeg
If you want to upload videos to rails application, and you wish to modify it on the fly, you archieve that by using FFMPEG.
Read more at the sourceEnvlogic – Ruby gem to have a Rails.env like environment behaviour in your non Rails Ruby applications
Envlogic is a simple gem that will help you manage your Ruby application environment. You can use it instead of a really popular solution like this one: How does it work? Well it uses Rails String Inquirer and a bit of magic to resolve the environment key name. It will try to figure out the […]
Read more at the sourceActiveRecord and FriendlyId: slug not generated when field set with before_validation callback
FriendlyId is an awesome gem for slugging and permalinking for Active Record. It works like a charm except one case: when you set friendly_id field in a before_validation callback. Here’s an example: It happens because FriendlyId uses a before_validation callback to set a slug. This method is invoked before any before_validation callbacks that you define […]
Read more at the sourceIntegrating Interswitch WebPay Payment Gateway With Rails
Interswitch WebPay is a leading Nigerian payment gateway and integrating WebPAY with any website is fairly simple. At a high level this integration can be achieved with following steps: Calculate a request hash based on input parameters like transaction reference, … Continue reading →
Read more at the sourceSinatra and Kaminari without any views and without padrino-helpers gem
If you have an app that doesn’t have any views (for example it only responds with JSON) you still may want to use excellent Kaminari gem for paginating big data sets. Unfortunately even when you work only with JSON and you don’t need any views helpers, you will still get this warning: so to get […]
Read more at the sourceFull-Calendar Rails Engine
A couple of years ago we integrated jQuery FullCalendar plugin with a rails backend. The plugin became reasonably popular and was being used in many Rails apps. Recently we upgraded it to include an efficient full-sized, drag & drop calendar … Continue reading →
Read more at the sourceRuby on Rails: RailsAdmin + HTTP Basic authentication
RailsAdmin is an awesome gem when you want to build a not-so-much custom admin panel. Unfortunately it’s not mentioned in documentation (or at least I couldn’t find it) how to use it with HTTP Basic authentication. Here is an example of how to do this (put this in your config/initializers/rails_admin.rb file): You should also use […]
Read more at the sourceClientSideValidations: Add/Map model validations to JS form validations
Easily map modal validation to client side javascript in Rails. Github: https://t.co/ucqUcsuO
Railscast: http://t.co/Og6vWbGy #rails
— Akhil Bansal (@bansalakhil) October 12, 2012
Flash Message Conductor now a Gem
We’ve been doing some early (or late… if you’re a half-full kind of person) spring cleaning on some of our projects. One of the small projects, flash_message_conductor, which we released last year as a plugin is now a gem. We’ve been moving away from using plugins in favor of gems as we like locking in specific released versions and being able to specify them in our environment.rb
file is quite convenient.
To install, just run the following:
sudo gem install flash-message-conductor --source=http://gemcutter.org
Successfully installed flash-message-conductor-1.0.0
1 gem installed
Installing ri documentation for flash-message-conductor-1.0.0...
Installing RDoc documentation for flash-message-conductor-1.0.0...
You’ll then just need to include the following in your config/environment.rb
file.
Rails::Initializer.run do |config|
# ...
config.gem 'flash-message-conductor', :lib => 'flash_message_conductor', :source => "http://gemcutter.org"
end
You can take a peak at the README for usage examples.
We’ll be packaging up a handful of our various plugins that we reuse on projects and moving them to gems. Stay tuned…