RSS

Archive for the ‘Rails’ Category

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

What do you get when the power of Ruby on Rails is combined with flexibility of Merb web framework? Rails 3 of course!

We have a very happy news: Rails 3 Beta is ready for testing. The improvements are numerous: ActiveRecord, ActionController, ActionView, and ActionMailer, ActiveSupport have all been redesigned. ActiveRecord got pimped with ActiveRelation scoped queries.

Some components have been refactored into their own: ActionDispatch, ActiveModel. Even better, all components can be used alone and you don’t have to require the entire Rails framework.

6 Feb 2010

Rails 3 Beta Ready with Merb Goodness

Author: ceefour | Filed under: Rails

A Ruby on Rails web application I’ve been developing uses Dojo-based full AJAX frontend. I learned some new tricks during development, relearned old pitfalls, and found some mistakes that I’d like to share with you.

21 Dec 2009

Three Ways You Can Speed Up Your Fresh Rails Development

Author: ceefour | Filed under: Rails

sbres 1260943259 0   How to Use ActionView Helpers in Your Rails Controller

Sometimes when developing a Ruby on Rails web application, you want to use an ActionView helper method inside your controller. The following tip is from Gabriel Gironda 1.

This is incredibly straightforward and more of an occasional convenience, but I thought I’d throw it out there anyway.

One use case is to use pluralize() in a flash message and not have to do it by hand using the inflector. You could include ActionView::Helpers::TextHelper in the controller, but that fills your namespace with crap.

Put this in the class ApplicationController instead:

16 Dec 2009

How to Use ActionView Helpers in Your Rails Controller

Author: ceefour | Filed under: Rails

While using Ruby for your projects, you may need some references.

These are some references that might help you in using Ruby:

  • Language

General Syntax Rules

  • Comments start with a pound/sharp (#) character and go to EOL.
  • Ruby programs are sequence of expressions.
  • Each expression is delimited by semicolons(;) or newlines unless obviously incomplete (e.g. trailing ‘+’).
  • Backslashes at the end of line does not terminate expression.

Reserved words

alias   and     BEGIN   begin   break   case    class   def     defined
do      else    elsif   END     end     ensure  false   for     if
in      module  next    nil     not     or      redo    rescue  retry
return  self    super   then    true    undef   unless  until   when
while   yield

Type

22 Mar 2008

Ruby Quick Reference

Author: ceefour | Filed under: HTML, Rails, Reviews, Ruby, Tools

Ruby is a high level, object-oriented open source scripting language. It has excellent support for regular expressions as a language feature.

In Ruby, a regular expression is written in the form of /pattern/modifiers where “pattern” is the regular expression itself, and “modifiers” are a series of characters indicating various options. The “modifiers” part is optional. This syntax is borrowed from Perl.

Ruby supports the following modifiers:

  • /i makes the regex match case insensitive.
  • /m makes the dot match newlines. Ruby indeed uses /m, whereas Perl and many other programming languages use /s for “dot matches newlines”.
18 Mar 2008

Using Regular Expressions with Ruby

Author: ceefour | Filed under: Ajax, Rails, Ruby, Tools

Advanced Rails

Advanced Rails offers you an in-depth look at techniques for dealing with databases, security, performance, web services and much more.

O’Reilly Media, Inc. published an intermediate-to-expert Rails book, authored by Brad Ediger:

Chapters in this book help you understand not only the tricks and techniques used within the Rails framework itself, but also how to make use of ideas borrowed from other programming paradigms. Advanced Rails pays particular attention to building applications that scale — whether “scale” means handling more users, or working with a bigger and more complex database.

16 Mar 2008

Advanced Rails: Go to the next level with Rails

Author: ceefour | Filed under: Books, News, Plugins, Rails, Reviews, Ruby, Web 2.0

Morph logo

Morph Labs is currently beta-testing their next-generation solution in application deployment, delivery, and management, the Morph Application Platform.

Acquiring hardware and configuring software to support web apps are things of the past. Morph Labs brings you the next-generation solution in application deployment, delivery, and management. Reduce your time to market and lower your startup costs no matter if you are an ISV, a developer or a business.

About Morph Labs

Morph Labs Inc. www.morphexchange.com is a Philippine-based Web 2.0 technology company focused on providing innovative technologies and applications to support Software as a Service (SaaS) globally.

I’d like to express a warm notice that AdaRuby.com might be down intermittently as we’ll be having major rearrangement and server upgrades of our hosting facilities in the coming days.

2209570995 3969af4b35 Rearranging Stuff Notice, `Experience Report’ Coming Up Soon!

The upside is, when it’s done (and oh YES it will be done!), I’ll be providing you interesting information on the stuff that we’re doing, especially our experience regarding the hosting services that we have been using all this time.

Looking forward to hearing you share your experience as well!

Canadian Web Hosting provides shared, VPS, and dedicated web hosting for Canadian sites. They operate from a 1st Class Colocation facility located at Harbour Center in downtown Vancouver, BC, Canada. The advantage to international (i.e. non-Canadian) hosting services are obvious: they are much faster to access from Canada (with an added bonus that you pay in your native Canadian Dollars currency! ;) Hence, if your customers and/or your business is based on Canada, hosting your Rails site with them might be a perfect fit.

5 Feb 2008

Ruby on Rails Web Hosting for Canadian Sites

Author: ceefour | Filed under: News, Rails, Rails Hosting, Ruby, Web 2.0

A common stumbling block for beginner Rails developers is learning the basics required to write plugins. This is made more complicated by the fact that Ruby is inherently dynamic and offers many techniques for code reuse.

Luckily, if you can write Rails applications you can write plugins by simply drawing on a handful of basic patterns.

Why write plugins?

Writing a plugin will:

  • Help make sharing code more efficient, whether it’s between projects or within the same project
  • Allow you to publish generic code to the community
  • Save time and increase your confidence by testing once and reusing many times
27 Jan 2008

Overview of A Rails Plugin

Author: ceefour | Filed under: Beginner, Plugins, Rails, Tips, Tools, Tutorials