Rails To Italy 07 will have a Q&A session with David Heinemeier Hansson, the creator of Ruby on Rails.
If you want to ask something to him, just send a mail to program@railstoitaly.org, the organization will select the questions.
Rails To Italy 07 will have a Q&A session with David Heinemeier Hansson, the creator of Ruby on Rails.
If you want to ask something to him, just send a mail to program@railstoitaly.org, the organization will select the questions.
Sometimes a Rails plugin can be dependant from another one. Since plugins are loaded in alphabetic order, probably you need to load the third part plugin first.
The release 1.2.4 2.0PR introduces breaking changes for this mechanism.
I’m developing a plugin called ClickToGlobalize, that’s dependant on Globalize, here the code for plugin initialization:
# Force Globalize loading.
if Rails::VERSION::STRING.match /^1\.2+/
load_plugin(File.join(RAILS_ROOT, 'vendor', 'plugins', 'globalize'))
else
Rails::Initializer.run { |config| config.plugins = [ :globalize ] }
end
require 'click_to_globalize'
Use the old mechanism if the current release is minor than the last release with it (1.2.3 1.2.4), else use the Rails::Initializer class.
The Rails To Italy conference has started a Coding Challenge. The topic will be “Your Favourite Thing” - create a small, interactive web application that is related to your favorite thing or activity*.
Prizes are 1 iPhone or iPod touch + 2 iPod shuffle!
Submission deadline is the 20th October 2007.
Hi, just a snippet to validate an url with Ruby on Rails.
class WebSite /^((http|https):\/\/)*[a-z0-9_-]{1,}\.*[a-z0-9_-]{1,}\.[a-z]{2,4}\/*$/i
def validate
errors.add(:url, "unexistent") unless WebSite.existent_url?(:url)
end
def self.existent_url?(url)
uri = URI.parse(url)
http_conn = Net::HTTP.new(uri.host, uri.port)
resp, data = http_conn.head("/" , nil)
resp.code == "200"
end
end