Flash Messages Helper: Rails Gem for displaying flash messages

Posted on JANUARY 19TH, 2010

I would like to announce the release of another gem over on Gemcutter .

Ruby Gems Logo

The flash_messages_helper gem is a simple but configurable and well documented helper for displaying flash messages inside of your Ruby on Rails applications.

For full details see the readme over on github .

Sorry for being so breif. Ruby 1.9 and Rails 3 compatablily are next on the roadmap for all these gems. I have promissed screencasts of some these recently released gems in action following the compatibly milestones.

Tags

Gravatar Image Tag: New features and bundled into a gem.

Posted on JANUARY 4TH, 2010

The Rails Gravatar Plugin has undergone a bunch of changes recently. Highlights for this 0.0.2 relase are as follows.

Gravatar Logo

  • It is now bundled into a gem hosted over on Gemcutter. (Still works as a plugin also)
  • Support for pulling Gravatars off of a secure https server was added.
  • Support for using Gravatar ratings was added.
  • Support for specifying a file extension was added.

All the old and new features and usage is well documented in the projects README.

Tags

Attribute Normalizer: Now also in ruby gem flavor

Posted on JANUARY 2ND, 2010
sudo gem install attribute_normalizer

The Attribute Normalizer rails plugin has been packaged up into a ruby gem hosted over at Gemcutter.

This release (0.1.1) also includes bug, feature, and documenation fixes.

I am looking for feedback on what I have planned for the 0.2 release of the gem/plugin.

Please take a look at the roadmap over on github and email me or drop a comment here with your feedback.

Cheers,
Mike D.

Tags

Ruby on Rails Flash Message View Helper

Posted on SEPTEMBER 28TH, 2009

I have been extracting and abstracting many of the components that I use across most of the Ruby on Rails applications that I work with and putting them up on GitHub as gems and Rails plugins. Here is another one (Flash Messages Helper) and I still have a lot more where these have been coming from.

Cheers, I hope you have a use for them.

Nudist Colony Flasher

I am in no way the first person to create a flash message plugin, but the other plugins that I did come across lacked any type of configuration or flexibility, so I ended up rolling my own.

Install

./script/plugin install git://github.com/mdeering/flash_messages_helper.git

After installing the plugin you just need to replace your flash message calls with the following in your layout file.

flash_messages

The configuration points of the plugin include being able to change the id and class attriubtes of the elements along with the type of element that actually wraps your flash messages. See the full documentation over on the flash_messages_helper plugin page at GitHub

Example Usage

I like to add a class hideable to all flash messages and then use jQuery to allow the user to remove the flash message elements from the page if they like.

# config/initilizers/flash_messages_helper_settings.rb
ActionView::Base.flash_message_class_proc = lambda {|key| "#{key} hideable"}

Now all flash messages will come out with the class hideable. We can unobtrusively attach the hiding behavor to the element with the following jQuery.


$(document).ready(function(){
  // Will add a link at the bottom of any element that is hiddable
  $.each($('.hideable'), function() {
    $(this).append('<a href="#" class="hide-link">Hide</a>');
  });

  // And this will actualy do the hiding of the parent element
  $('a.hide-link').click(function() {
    $(this).parent().hide('slow');
    return false
  });
});

Do me a quick favor if end up using some of my work. Take the time to Recommend me on Working With Rails , give me or one my repos a follow over on Github , follow me over on Twitter , or all of the above.

Tags

Ruby on Rails Gravatar Plugin

Posted on SEPTEMBER 23RD, 2009

Last week I got around to wrapping up my old Gravatar solution into an actual configurable Ruby on Rails plugin and hosting it over on GitHub .

Gravatar Logo

Here is some example usage and configuration examples.

Install as you would any other plugin


./script/plugin install git://github.com/mdeering/gravatar_image_tag.git

Basic usage


gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering')

Configuration Points

Change the default image to your own rather then using the one set by Gravitar


# config/initializers/gravatar_defaults.rb
ActionView::Base.default_gravatar_image  = 'http://assets.yourhost.com/images/default_gravatar.png'

Change the default (80px x 80px) size of the gravatars on your site.


# config/initializers/gravatar_defaults.rb
ActionView::Base.default_gravatar_size  = 120

Full usage and documentation is avalible in the gravatar_image_tag plugin repository on GitHub .

Tags

Available For Hire

Contact Me

Michael Deering http://mdeeirng.com Cell: 780.906.6632

Testimonials

" Michael understands what is means in business to abide by timelines and budget. His great work ethic and agile perspective allow him to motivate and manage himself, and his team, seemingly without effort. He has a great attitude and enjoys sinking his teeth into projects that leverage and push his skill set to the limit. "
Erik Lagerway / Co-Founder & CEO / Gaboogie

" Michael's attention to detail and intense interest in continuously improving the software development process made working with him a very enjoyable experience. Michael was a great manager to work with during my time at Lypp. In addition he was an excellent software developer that set a high standard for others to meet. I would definitely work with Michael again in the future. "
Dan Kubb / Ruby Hero

" Mike is a very sharp technologist with an eye for simplicity. He is able to break down complex concepts into elegant solutions and communicate them effectively with a remote team. Mike's leadership is apparent by his ability to manage scope, keep deadlines and translate evolving business requirements into flexible technical solutions. "
Jason Cartwright / CTO / Cogwise Software

Post Categories