#ruby on rails
15 posts tagged ruby on rails. Clear filter
-
A Through Z
How to print the alphabet in Rails very easily.
-
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...
-
link_to_function Rails Ajax Reference
Link\to\function syntax for Haml template. Notice the "|" pipe which will allow for new lines in your code.
-
Build Your Own Calendar in Rails without any Plugins in less than 10 lines of Ruby Code
There are a number of terrific calendar plugins for Rails. But it's almost as easy, if not easier, to implement your own calendar. The steps are pretty simple. First get the @beginning\of\month and...
-
Override to_param method in model to get pseudo permalinks without any work
There are a number of permalink plugins for Rails, http://www.seoonrails.com/even-better-looking-urls-with-permalink\fu, is a good one that I've used before. However, this involves informing the...
-
Date and Time Helpers in Rails
Just for reference http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.htmlM001695
-
Cool Conditional Syntax in Ruby (on Rails)
Ruby is beautiful Simply elegant!
-
Acts_as_versioned Rails Plugin
Versioning models with the acts\as\versioned plugin In your model In db/migrate/\\\\\create\posts.rb Migrate your db Usage \Quick Note If you want to revert to an older version in a controller or...
-
Manage Fixtures with Yaml DB Plugin for Rails
Get the plugin like so... This command will dump your data And load it back Beautiful :) More info here http://blog.heroku.com/archives/2007/11/23/yamldb\for\databaseindependent\data\dumps/ and...
-
Problem slash Bug in Rails with attr_accessor and Datetime Select Fields
Looks like there is a problem with using the attr\accessor method with datetime form fields http://dev.rubyonrails.org/ticket/8983 In Rails 2.3.2, for me at least, the problem seems to be popping...
-
Trouble Using Attr_Accessor in Rails Models and Forms
You might use the attr\accessible method to create getters and setters for a class that has attributes which don't map directly to corresponding fields in a database. For example let's take the...
-
David Heinemeier Hansson - Ruby on Rails, Startups, Culture
[youtube]http://www.youtube.com/watch?v=sb2xzeWf-PM[/youtube]
-
Ruby on Rails vs. PHP in a Nutshell
[youtube]http://www.youtube.com/watch?v=p5EIrSM8dCA[/youtube]
-
Nested Has_one Relationship with Fields_for and Attr_accessible in Model Class
To make child attributes accessible to your model through a nested forms (Rails 2.3) you'll need to add the "{child\class}\attributes" to the attr\accessible method in your parent class. If you...
-
Nested Attributes in a Form for Has_One Model Association in Rails
Just for reference...