Feeds:
Posts
Comments

Posts Tagged ‘lessons’

” Arthur Neil “.squeeze(” “).strip To find empty characters/space in a filed; use if params[:description].squeeze(” “).strip.length == 0 [handle it here] end

Read Full Post »

First-year students at Veterinary school were attending their first Anatomy class, with a real dead pig. They all gathered around the surgery table with the body covered with a White sheet. The professor started the class by telling them, ‘In Veterinary Medicine it is necessary to have two important qualities as a Doctor: The first [...]

Read Full Post »

If you have recently updated to Rails 2.2 or +, you may encounter this error: /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443:in `load_missing_constant’: uninitialized constant Inflector (NameError) from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:92:in `const_missing’ from /usr/local/rails/mogulus/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations.rb:13 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ Go to the error file; /usr/local/rails/mogulus/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations.rb and replace; Inflector.inflections do |inflect| . . . end with; ActiveSupport::Inflector.inflections do |inflect| . . . end

Read Full Post »

You may face some issues while configuring rails; no such file to load — mysql /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’ /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require’ /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/mysql_adapter.rb:65:in `mysql_connection’ and so on step 1: If you havn’t done “gem install mysql”; do it first. step 2: If it doesn’t work even after “gem install mysql”; search for “mysql.so” in your system. [...]

Read Full Post »

Use; set_table_name :name_of_the_table in your model (E.g) class myTable < ActiveRecord::Base set_table_name :media end

Read Full Post »

Eyes have one language everywhere…..

Read Full Post »

Create a controller with the name ‘sitemap’ (or) with the name you desire….. (E.g) ruby script/generate controller sitemap (or) You can manually create one [app/controllers/sitemap_controller.rb] When you view the ‘controller file’ which you created just now, it would look like; class SitemapController < ApplicationController end Once it’s done, we need to add the functionality to [...]

Read Full Post »

If you are trying to run the script in an updated div, that may work with the internal scripts – something like; <script type=”text/javascript”> alert(‘hello’); </script> But when you try to access some external javascrips, (e.g); <script type=”text/javascript”> <script type=”text/javascript” src=”/javascripts/my_script.js”></script> </script> that will not work. The work-around is; [if you are using mootools.js for [...]

Read Full Post »

Experience

Experience is a kind of teacher; who gives the test first before presenting the lesson.

Read Full Post »

Who is at Risk?

A mouse looked through a crack in the wall to see the farmer and his wife opening a package; what food might it contain? He was surprised to discover that it was a mouse trap! Retreating to the farmyard, the mouse proclaimed the warning, “There is a mouse trap in the house, there is a [...]

Read Full Post »

« Newer Posts - Older Posts »