January 2012
3 posts
Add facebook app to page tab
When Facebook remove the own apps page, he also kill easy opportunity to add this app to your facebook page tab. Now, you can do it easy with this magick url: https://www.facebook.com/dialog/pagetab?app_id=[APP_ID]&display=popup&next=https://[URL_TO_YOUR_APP_ON_YOUR_SERVER]
Jan 17th
4 tags
Ruby wrapper for startmobile sms service →
This gem provide the easy way to send and check a single sms with startmobile.com.ua service. Install gem 'startmobile_sms' Configure StartmobileSms.setup do |config| config.login = 'login' config.password = 'password' config.out_number = 'out_number' end Usage # Send single sms (out_number is optional) sms_id = StartmobileSms.send(:phone => '30971234567', :text => 'Hello!',...
Jan 17th
16 notes
Friendly_id. Don't change slug on update
If you don’t want to regenerate you slug when model change friendly_id field, use this hook: # config/initializers/add_static_to_friendly_id.rb module FriendlyId module Static def should_generate_new_friendly_id? new_record? end end end # your model class MyModel < ActiveRecord::Base extend FriendlyId friendly_id :something, :use => [:slugged, :static] end
Jan 16th