Posted by Suhas on July 21, 2018 ·
Install dovecot with `brew install dovecot`
Open /usr/local/etc/dovecot/dovecot.conf
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = 127.0.0.1
# Protocols we want to [...]
Posted by Suhas on March 1, 2015 ·
I thought I would quickly post this.
Use the usual command to generate the scaffold.
rails generate scaffold Model
then in routes.rb
Change
resource :models
to
resource :models, :path => ‘model’
Posted by Suhas on July 3, 2012 ·
Another quick little snippet. This is when you use it in a loop.
$my_post = array();
$my_post['ID'] = $post->ID;
$catarray = array(31); // 31 is the cat ID you want to assign
foreach((get_the_category($post->ID)) as $category) {
array_push($catarray, $category->cat_ID);
}
$my_post['post_category'] = $catarray;
wp_update_post( [...]