Preview Email in Rails • 07.02.13
I’ve recorded another video showing RailsMailPreview and FBDistributedNotification specifically on how to preview your email from a rails app.
I’ve recorded another video showing RailsMailPreview and FBDistributedNotification specifically on how to preview your email from a rails app.
I made a video on using nokogiri and curb to web scrape. Simple but to the point maybe I’ll start to make more of this stuff.
RailsMailPreview has been updated to work on Mac OSX 10.8.
To download visit: http://nufex.com/
I recently wrote an app called RailsMailPreview which will capture any emails being sent from your Rails app.
Once they are captured you can preview what they will look like to the end user.
It is available for purchase from the Mac App Store:
http://nufex.com/link/rails-mail-preview
Lately I’ve been working on updating www.skatr.us which is a site built with Rails and the new code will be ridding Rails 3, and I’ve been porting it over to use HAML as it’s way better than writing erb.
I’m also now using the new sass which I can now get rid of the css less plugin which essential did the same.
For Fixtures I started using machinist and it’s just awesome, at a project I used to work on I had to use monkey type fixtures and that was not fun, machinist makes it fun again. Try it see for yourself.
In the past years I’ve always tried to use MacVIM but I just couldn’t keep with it because for one it didn’t look great and I had grown to like Textmate. Recently I decided to get back into learning and use MacVIM for all my development needs except for Cocoa Development where I use XCode because it works awesome with it. I think it has taken me about a week to start getting used to it, the only problems I have at the moment are, I will sometimes type the wrong command but it’s getting better. Practice makes perfect so I will keep trying.
In the current project that I’m working on I wanted to give the user the ability to add an email to their address book.
The thing I wanted the user to see was AddressBook.app open and show the current person’s email in edit mode.
The way I did that was like so:
Yes that’s me the first blurry one. Photo by Chuck Toporek.
After attending NSConference USA 2010 in Atlanta, GA all I have to say it was awesome! Really it was. The content was great. The folks were cool and the food was ok not bad. One thing that I really did not like and I think everyone would agree, food was not allowed in the auditorium. I’ve managed to record a few of the talks using QuickTime on my Macbook. I think one of the best talks was “Spelunking OSX” it’s just awesome. The lunch talks were also great. The Cocoa Rumble was really great and entertaining. Hopefully next year it will be at a different city, I have nothing against Atlanta but having a conference in different cities will be great.
Atlas is like Xcode. Atlas is built with Cappuccino and Cappuccino is built using a language called Objective-J which is just a superset of JavaScript and its very cool! Just like Objective-C is a superset of C. The best thing I like about it is that it’s so much like Cocoa and Objective-C. The syntax is almost the same, NSObject would be CPObject.
280 North makes Atlas and I signed up for their beta program from beta version 3. Once I had access I played with it but didn’t do much. Now just yesterday I got interested in it again and while reading the forums to see what people where saying I saw a tutorial that caught my interest ( http://blog.jerodsanto.net/2009/11/280-atlas-introductory-screencast/ ) and I decided to write a simple app as-well.
I wrote a simple calculator to calculate the tax of an item but my goal was to find out if NSNotification was being supported and well, it is being supported of course it’s not called NSNotification but called CPNotification. In Objective-J ALL classes are prefixed with CP instead of NS. Here is my source code for the app I wrote using Atlas.
To learn more about Atlas go to their site and read about it and of course try it out!
Francisco Tolmasky – FOWA Maimi 2009 from Carsonified on Vimeo.
Today, I started a new project. A minimalistic bug tracker that should really work under Dreamhost. The only reason I need this to work on Dreamhost is because bills begin to add up after having a few VPS accounts and I’m trying to cut my spending and since Dreamhost gives me unlimited disk space and bandwidth I figure I will use it and yes I know I can use GitHub but that cost money for private repositories.
I installed the latest rails using sudo gem install rails –version 2.3.5 and I got Capistrano all set-up and was able to deploy. Now the only thing that took almost all day was trying to figure out why rails would not process the request. So I did “rake rails:freeze:gems” to freeze the gems. Once I did that I was having problems with Rack version 1.0 already activated and I hacked around RubyGems to see if I can deactivate it but I didn’t find anyway of doing that. I also googled a ton of searched but found nothing.
What did work was to modify the rails core, ActionController to be specific in file:
vendor/rails/actionpack/lib/action_controller.rb
I modified lines 34 and 35 and commented them out.
I then added the following:
load "#{RAILS_ROOT}/vendor/gems/rack-1.0.1/lib/rack.rb"
the end result look like this:
#gem 'rack', '~> 1.0.1' #require 'rack' load "#{RAILS_ROOT}/vendor/gems/rack-1.0.1/lib/rack.rb"
which after doing that, it ALL worked well. Now I can continue with building my app.
NSConference 2010 (USA) just opened up for registration and I just completed registering for the iPhone Developer Sessions and Mac Developer Sessions which makes that a 3 day conference for me. It will held in Atlanta, Georgia at Georgia Tech Research Institute from Sunday, February 21 through Tuesday, February 23, 2010.
This will be my very first Mac Developer conference and I’m really not sure what to expect but the quotes from last years conference sound great. One thing I do expect is for Wifi not to work and to not expect any meat for food which happened at other conferences I’ve been to. Considering I have only been to two other ones. Hopefully that will not be the case and they will have meat! I guess I will find out when I get there…
Register to NSConference 2010 only 200 spots will be available so do it early.
So, it’s been while since I last wrote something here.. Well it’s for a good reason, I’ve been busy with work but besides the work hours, I actually managed to create a PHP Framework which I call Cupcake. The reason for the name is being that I wanted a version of CakePHP without lots of the component I will never use. I initially forked CakePHP but ran into some issues with it. So I decided to write my own and implement it that way I thought it should be. That is available on Github.
Another project I’m working on is a Mac OS X Application that will be similar to my previous apps GAMV and LyFOX which were a great success, and I will attempt to release it by the end of this year 2009.
While looking into my app for deprecated methods I have found one that did not have much documentation to it. It was a delegate method from UIImagePickerControllerDelegate and this is the way I use it for when an image is ready to be posted.
- (void)imagePickerController: (UIImagePickerController *)picker didFinishPickingImage: (UIImage *)img editingInfo: (NSDictionary *)editInfo { [[picker parentViewController] dismissModalViewControllerAnimated:YES]; [image setImage:img]; [self confirmPhotoUpload]; }
Now the only problem with that method above is that it is now deprecated in the iPhone OS 3.0 SDK and you must now use a method called imagePickerController:didFinishPickingMediaWithInfo:
and the way I use that method is like this:
- (void)imagePickerController: (UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info { [[picker parentViewController] dismissModalViewControllerAnimated:YES]; UIImage * img = [info objectForKey:@"UIImagePickerControllerEditedImage"]; [image setImage:img]; [self confirmPhotoUpload]; }
So if your stuck trying to figure out what method to now use, use imagePickerController:didFinishPickingMediaWithInfo: and what will have a NSDictionary with all the needed information about the image.
This weekend as I wait for Apple’s response to my iPhone App being accepted or rejected. I’ve been wanted to create an Adium Plugin for a while, so now I took the initial steps and made it much easier to begin. I have created a XCode Template for creating your own Adium Plugins.
It can be downloaded over at my github reposity.Â
http://github.com/fernyb/adiumplugin/tree/master
Installation
If you do not have that directory create it and navigate to it.
If that does not exist make sure to create it.
Copy all files from git repository and place them in:
“/Library/Application Support/Developer/Shared/Xcode/Project Templates/Adium/Plugin”
Lately, I’ve learned how to use GDB with XCode and it’s awesome! It really saves your lots of time debugging an app. I was having lots of trouble trying to figure out why an instance variable was not retaining it’s value in a new method.
Well, it happen to be I was using a UITableViewDelegate and those methods where being called before my setter method and so the instance variable was nil, the only way I found this out was by using GDB and believe me NSLog for debugging is not always going to work.
|