Rails Paperclip Plugin Options for Attaching Files
I usually change some of the default settings when I use the Paperclip plugin. For most of my projects I don't like having separate directories for each image that is uploaded. I prefer, in this instance, to put avatars of different sizes together under o...
Written by Sean Behan on 06/17/2012
Why Doesn't Google Offer Dedicated Virtual Hosting?
AppEngine is nice, but it's a little limiting. No cron jobs, filesystem use nor customization with third party libraries, software, databases, languages, etc. You can't deploy PHP, Ruby and or your 'other' favorite web development tools.
You can only use ...
Written by Sean Behan on 06/17/2012
JSON::GeneratorError: only generation of JSON objects or arrays allowed
If you run into this error message try switching to an earlier version of ExecJs.
JSON::GeneratorError: only generation of JSON objects or arrays allowed
# Gemfile
gem 'execjs', '~> 1.4'
gem 'coffee-script'
gem 'sass'
...
Written by Sean Behan on 08/22/2013
Extending Rails Form Builders
Extending forms in Rails is simple and will greatly reduce the amount of code in your views. This example is taken right from the Agile Web Development book on Rails(2.1.*) with one minor tweak. I want to pass a label argument along with the field name so...
Written by Sean Behan on 06/17/2012
Rails Select Tag and Onchange Event Calling a Remote Function with Default Option Selected
Here is a little code snippet that will fire off a request to update_client_path when you change the select field. This stands alone, rather than being apart of a larger form. The Client::CATEGORY argument is a hash, which I populated manually in my Clien...
Written by Sean Behan on 06/17/2012