#ruby on rails
12 posts tagged ruby on rails. Clear filter
-
Rails Prototype JS and TinyMCE Autosave
TinyMCE is a nice little WYSIWYG for text processing online. It uses iFrames and Javascript callbacks to manipulate textarea form fields. Using it with Rails can be somewhat problematic if you want...
-
Set Cron Job to Run Every Five Minutes for a Ruby on Rails Rake Task
First off you'll need to edit your cron file. Normally, the cron files are kept under /etc/cron.daily or /etc/cron.hourly but we can just use the command line tool, crontab and pass it the -e flag,...
-
Validate Uniqueness on Join Tables in Rails
How to validate uniqueness in a :has\many :through relationship with Ruby on Rails. You'll need three models in this example List, Subscriber and ListSubscriber. A list has many subscribers and a...
-
named_scope in Rails
Take advantage of the named\scope method in your models and make find queries simple and beautiful! Now you can get all comments for your posts that are marked as pending with this method:
-
Ruby strftime() method arguments
Just for reference strftime() arguments in ruby. Usage Time.now.strftime("%B/%d/%Y") %a weekday name. %A weekday name (full). %b month name. %B month name (full). %c date and time (locale) %d day...
-
Namespacing in Rails
With namespace routes in Rails you can easily create a prefix for select resources. For instance, if you have an admin area or an account dashboard you can give logged in users access to methods...
-
rails fixtures: using the right timestamp
Fixtures in Rails allow you to quickly and easily populate a database with sample data. They are great when testing your app and you need to test against a condition that will rely on a certain...
-
upgrading to latest phusion passenger 2.1.2
super easy will walk you through the install and remember to copy paths to your apache config file. for passenger i kept it in mods-available/passenger.conf and then linked it to mods-enabled then...
-
mysql on rails 2.3.2
mysql driver is no longer bundled w/ rails. you'll need to install it yourself w/ however, on ubuntu (heron) this won't work. issue these commands first if libmysqlclient-dev fails... try...
-
using rails paperclip plugin on ubuntu
paperclip is an awesome plugin for rails. it let's you attach an image to any of your models. installation and usage more information is available at...
-
Rails, SSL, Ubuntu, Apache2 with Phusion on Ubuntu
Here are all the commands for setting up your Rails application to server requests over SSL -on Ubuntu, of course. There are great resources and tutorials at these websites....
-
Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git
Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a...