Blog

Jul
08

Kazaa.com launches

Posted by Michael Cindric in client projects | No Comments »

Sentia is happy to announce that new kazaa.com service has gone live.

Its been a long time coming and a huge effort but we are proud of what has been achieved. Sentia has been working with the Kazaa team to develop this new service which offers legal music streaming and downloading.

So be sure to check it out Kazaa.com

Apr
09

Learning Ruby On Rails

Posted by Michael Cindric in Tutorials, development, ruby on rails | No Comments »

Hey spoken to a few developers mainly UNI grads who are looking to get into rails and they often ask whats the best way to do so. So l thought l would put together a list of resources they can use to get up to speed.

If anyone else knows of some other ones please let me know

== General Practices ==
Dev on a Mac
Read up on TDD (Test Driven Development)
Use Growl for your Autotest notifications
TextMate – The only Editor you need
GitHub – Great space to see open source code and gems and plugins
http://gemcutter.org/

== Rails Setup ==

http://hivelogic.com/ – Has some great tutorials on getting your environment setup on a mac.

== Tutorials ==
http://rubyonrails.org
Rails Casts – Ryan Bates screen casts about all things rails related
PeepCode – Great screen casts about all things rails related

== Blogs ==

Sentia Blog
http://thoughtbot.com
http://weblog.jamisbuck.org
http://blog.jayfields.com
http://errtheblog.com

== Books ==
http://pragmaticstudio.com – Great source of books about rails and other technologies with a focus on the right practices.

Finally the only real way to learn is to try things out. Follow other developers blogs and use all the resources you can such as Google groups etc.
Don’t be scared to get it wrong its the only way to learn.

Mar
24

Altnet released

Posted by Michael Cindric in Business, client projects | No Comments »

Sentia is happy to announce that Altnet from the guys at Kaza has been pushed live. Altnet is the new way to listen to your favorite music online legally.

Sentia has been working around the clock with the Altnet team on this and be sure to keep an eye out at Altnet.com for more improvements as time goes on.

Jun
17

Adding your own login method to Authlogic

So on a new project we are working on we have a need for a user to be able to login via either their “Login” or “Mobile” number. Now we are using the Authlogic gem which is a great gem and comes with all default methods for login etc and allows you to customise this very easily.

So firstly you need to add the following to your UserSession model. What this does is overwrite the default login method with the one we are defining below called “find_by_username_or_mobile”.

class UserSession < Authlogic::Session::Base
  find_by_login_method :find_by_username_or_mobile
end

Then in your user model its as simply as creating the class method for login. Now of course the password is still apart of the login process but we only wanted to allow users to either login via their login or mobile so no need to change the password methods.

class User < ActiveRecord::Base
  def self.find_by_username_or_mobile(login)
    find_by_login(login) || find_by_mobile(login)
  end
end

So give it a try and let us know how you go hope this helps

May
08

Application templates in Ruby on Rails

Posted by Michael Cindric in development, javascript, jquery, ruby on rails | 3 Comments »

Here is the latest application template we have put together. It removes all the usual items and adds the base gems that we use for all our applications. It also creates the files needed for deployment and runs “Capify” on the project, plus a few other things such as sass etc.

# Remove unnecessary Rails files
run 'rm README'
run 'rm public/index.html'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
run 'rm -f public/javascripts/*'

# Download JQuery
run "curl -s -L http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js > public/javascripts/jquery.js"
run "curl -s -L http://jqueryjs.googlecode.com/svn/trunk/plugins/form/jquery.form.js > public/javascripts/jquery.form.js"

#Configure required gems
gem "haml", :version => "2.0.4"
gem 'thoughtbot-shoulda', :lib => 'shoulda', :source => 'http://gems.github.com'
gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com"

#Create Sass directory
run 'mkdir public/stylesheets/sass'

#Capify and create production environment.rb
run 'mkdir config/deploy'
run 'touch config/deploy/production.rb'

#Add UAT environment and settings
file 'config/environments/uat.rb', <<-CODE
# Settings specified here will take precedence over those in config/environment.rb

# Code is not reloaded between requests. Server needs to be restarted.
config.cache_classes = true

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching             = true
config.action_view.cache_template_loading            = true

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
CODE

#Create gitignore file and setup base ignores
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
db/*.sqlite3
public/stylesheets/*.css
FILE

# Set up git repository
git :init
git :add => '.'
git :commit => "-a -m 'Initial commit'"

# Success!
puts "SUCCESS!"
Mar
18

Ruby on Rails 2.3 Searchable API Doc

Posted by Michael Cindric in development, ruby on rails | No Comments »

A developer by the name of Vladimir Kolesnikov has put together a nice little searchable API doc for rails. Its been updated for rails 2.3.2 (Latest Version) and you can either download it or browse online. Currently its been tested with Safari 4, Firefox 3, Opera 9.5 Internet Explorer is currently unsupported but who uses IE anyways.

You can download it here