Saturday, June 14, 2008

Some Of RoR Resources

Here are some of the RoR resources from where u can get all the details you want regarding RoR You may add your sites via comments

  • Main Ruby Site - Official Ruby site. Find a complete list of all documentation, tutorials, news etc.

  • Ruby Documentation - Ruby documentation site.

  • Ruby Installation - One-Click Ruby Installer for Windows.

  • RubyForge - Open source project repository.

  • Ruby on Rails - Official site for Ruby on Rails.

  • RubyGems - Download link for RubyGem and other documentation.

  • Rails APIs - A comprehensive list of Rails APIs

  • Rails Conf - RailsConf, co-presented by Ruby Central, Inc. and O'Reilly Media, Inc., is the largest official conference dedicated to everything Rails.

  • Ruby Central - Ruby Central, Inc., is a 501(c)(3) tax-exempt organization, dedicated to Ruby support and advocacy.

  • MySQL Homepage - Here you can download the latest MySQL release, get the MySQL news update. The mailing list is also a great resources for anyone who want to build dynamic websites using MySQL.

Wednesday, June 4, 2008

Setting Up meta tags in RoR application For SEO


Meta tags are one of the important aspect for any site. And RoR having the power for clean urls setting up proper meta tags will really do wonders for the site.

So here is the method to setup the meta tags dynamically for all the pages

Here’s what I do (and it’s just one way of many) :

In my layout/application.rhtml
1

2
3
<%= @meta_title %> My Site Name>

"keywords" content="<%= @meta_keywords %>" />
"description" content="<%= @meta_description %>" />

In my application controller:

1

2
3
4
5
6
7
8
  before_filter :meta_defaults

private

def meta_defaults
@meta_title = "Welcome to"
@meta_keywords = "my keywords"
@meta_description = "my meta description"
end
and then in individual actions in my controllers I override the defaults
1

2
3
4
5
def view

@article = Article.find(params[:id])
@meta_title = "#{@article.name} - "
@meta_description = @article.short_description
end

There are many other ways to do it..If there is a better way that you have pls share ur views below.