



Interesting post here ( http://kpumuk.info/ruby-on-rails/simplifying-your-ruby-on-rails-code/ ) about Presenter patterns but buried in it is a little snippet of code that I want to store away for later
“I prefer to put presenters into a separate folder app/presenters, so first we should add it to Rails load path. Add this line to your config/environment.rb:”
config.load_paths += %w(#{Rails.root}/app/presenters )
There [...]




This has tripped me up twice trying to connect a new install to the oracle db I’m using. The error message suggests that you run ‘get install activerecord-oracle-adapter’, however that will come back and tell you that it couldn’t be found locally or in the repository.
You need to run:
gem install ruby-oci8 -v 1.0.6 (this [...]




There are a number of gotchas when using rails with legacy db’s. Here are the ones I’ve ran headfirst into and how I got round them
Table name doesn’t follow rails naming conventions:
set_table_name ‘legacy_name’
Primary key doesn’t follow rails naming conventions:
set_primary_key ‘legacy_primary_key_name’
Using a sequence (need to do this in oracle):
set_sequence_name ‘legacy_sequence_name’
So far so straightforward, you might however [...]




I came across this picture recently and thought it was worth a posting.
Share and Enjoy:




I had a problem recently with Jquery where I wanted to clone a form. I had a model pop-up box which contained a large form. The user could click a button to bring the form up, enter the details and then hit ok to close the form again. They could also go back at any [...]




JSON is really simple for those that haven’t had a chance to use it yet, maybe it’s just me but when I stumble across a new TLA or FLLA (that’s a three letter acronym or a four letters long acronym) I usually very apprehesive. But I can give you an all-you-need-to-know JSON tutorial right here.
JSON [...]




I’m managed to totally fuck up moving my home/ directory onto the bigger SSD on my Eee PC. I tried to rollback my changes by copying the folder back to the correct place (as root) and removing stuff I’d added to fstab.
And then rebooted my machine.
Bad news, by copying the folder as root I’d effectively [...]




Was thinking about this the other day, so I thought I’d state it out-loud so to speak.
While I think this theme total rawks this is not a tactict acceptance of a certain OS that might bear a passing resemblance to it.
Vista still sucks ass. (’Mon the penguins)
Share and Enjoy:




As soon as I’d made up my mind to get an Eee PC 901 I had it in the back of my mind to get this done. However my first couple of attempts ran aground upon the pointy rocks of my general linux ignorance. But, to quote Homer Simpson: ‘If at first you don’t succeed, [...]




UPDATE: Hands up I made a boo-boo, I had listed the variable that holds the token as ‘form_authentication_token’ and it should have been ‘form_authenticity_token’, many apologies for the inconvenience.
So I was trying my first ajax calls to a rails backend and I hit this ugly error -
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken)
I hunted about on google till I found [...]


More Options ...

Categories
Tag Cloud
Blog RSS
Comments RSS

Void (Default)
Life
Earth
Wind
Water
Fire
Lightweight