skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

These are the posts from December 2008

December 25, 2008
Posted by roadburn

Attach images in rails

View the railscast on using thoughtbot’s paperclip

http://railscasts.com/episodes/134-paperclip

or

attach multiple images to a model using polymorphic paperclip

http://burm.net/2008/10/17/ruby-on-rails-polymorphic-paperclip-plugin-tutorial/

No Comments

Posted Under Sharepoint

December 15, 2008
Posted by roadburn

Learning how to use Shoulda

View the conf video to find out what Shoulda is

http://mwrc2008.confreaks.com/12saleh.html

Shoulda Walkthrough

http://technicalpickles.com/posts/a-walk-through-of-test-driven-development-with-shoulda

Read the thoughtbot tutorials

http://thoughtbot.com/projects/shoulda/tutorial

No Comments

Posted Under Rails

December 8, 2008
Posted by roadburn

Rails export to excel spreadsheet

1
$ sudo gem install spreadsheet

More help:

http://codeclimber.blogspot.com/2008/11/reporting-in-excel-with-rails.html

http://spreadsheet.rubyforge.org/

To send and save through browser

Taken from https://rubyforge.org/forum/forum.php?thread_id=29606&forum_id=2920

1
2
3
4
require 'stringio'
data = StringIO.new ''
book.write data
send_data data.string, :type=> "application/excel", :disposition=> 'attachment', :filename => 'MeaningfulName.xls'

No Comments

Posted Under Rails

December 4, 2008
Posted by roadburn

Send email in rails

http://railscasts.com/episodes/61

No Comments

Posted Under Rails


Posted by roadburn

Rails sending email Net::SMTPFatalError

From: http://readlist.com/lists/lists.rubyonrails.org/rails/3/15740.html

Configuring local_recipient_maps in main.cf
The local_recipient_maps parameter specifies lookup tables with all
names or addresses of local recipients. A recipient address is local
when its domain matches $mydestination, $inet_interfaces or
$proxy_interfaces. If a local username or address is not listed in
$local_recipient_maps, then the Postfix SMTP server will reject the
address with “User unknown in local recipient table”.

The default setting, shown below, assumes that you use the default
Postfix local(8) delivery agent for local delivery, where recipients
are either UNIX accounts or local aliases:

/etc/postfix/main.cf:
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
To turn off unknown local recipient rejects by the SMTP server, specify:

/etc/postfix/main.cf:
local_recipient_maps =
That is, an empty value. With this setting, the Postfix SMTP server
will not reject mail with “User unknown in local recipient table”.

No Comments

Posted Under Rails

December 3, 2008
Posted by roadburn

Sharepoint 2007 Unknown Error when deleting list columns

Did you customize your application master pages and get this error while trying to delete list columns?

Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)  
 
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)  

Ok that probably means you have a search box in the template which is messing things up, just remove it or hide it, and that will do the trick!

2 Comments

Posted Under Sharepoint

December 2, 2008
Posted by roadburn

Calendar Date Select

http://code.google.com/p/calendardateselect/

No Comments

Posted Under Sharepoint

  • CATEGORIES
    • Coding Tips
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS