Archive for August, 2009

Aug 28

Hi,

If you was using Facebooker plugin and Jquery on your project, maybe you will have problem implement it cause Facebooker was come with prototype js default.
Here I show how to use Facebooker along with Jquery :

  • open file vendor/plugins/facebooker/lib/facebooker/rails/helpers/fb_connect.rb, then edit it.
  • search for line that contains
  •  options = {:js => :prototype, :app_settings => '{}'} 
  • change
  • :js => prototype
  • into
  • :js => jquery
  • save file

Now you are ready to use facebooker with jquery.

Thanks,

Aug 27

If you have legacy tables which’s impossible to deal with Active Record ( name table is not same with name model, controller), you can setting table name in model :

for example :

set_table_name "review­_feature_7"
set_primary_key "feature_id"

and to create ‘review_id’ become primary key when you create migration, you just put => :primary_key and give :option => “auto_increment=1″ for setting that field become auto increment after create table :

for example :

create_table "review_feature_"+product_space.id.to_s, : primary_key => :feature_id, : options => "auto_increment=1" do |t|
end
Aug 26

If you want to put breadcrumbs in your rails application, please have a look “Crummy” Plugin.

This is a simple breadcrumbs, and no javascript library required.

You can install it by type :

ruby script/plugin install git://github.com/zachinglis/crummy.git

How to use :

1. In your controller you may add_crumb either like a before_filter or within a method.

Example :

class ApplicationController

add_crumb “Home”, ‘/’

end

class BusinessController < ApplicationController

add_crumb(”Businesses”) { |instance| instance.send :businesses_path }

add_crumb(”Comments”,

:only => “comments”) {|instance| instance.send :businesses_comments_path}

before_filter :load_comment, :only => “show”

Aug 14

One of our latest projects need a VoIP feature to enable web user to make calls to landline numbers. We tried Lypp but we found a lot of bugs that make us nervous – is this system reliable at all?

1) It said to send an email to api@lypp.com to get a developer account. Dont be fooled – they will never reply you!

2) So OK, I signed up for a real account with real credit card. All is well for several days until we suddenly cannot make a call. It says ‘there is no billing‘. Hmm…