- form_for :user, :url => users_path do |f|
%ul.register
%li
...
def which_class?
if self.language == "C/C++"
self.language = "sh_cpp"
...
Ruby class picker
language is a column in a c...
def zipcode=(new_zipcode)
if new_zipcode != self.zipcode
write_attribute(zipcode, new_zipcode) #problem here
...
Ruby overwriting an activerecord...
I simply want to overwrite ...
<%= (@post.category ? @post.category.name : '') + ' ' + link_to(@post.title, post_path(@post)) %>
Ruby Handling nil object
@post.category can be nil, ...
class PostsController < ResourceController::Base ...
Ruby resource_controller: Redesi...
Backstory on my blog: http:...
module ModelHelpers def self.included(base) ...
Ruby textilize model helper
OK, so I just realized ther...
namespace :migrations do desc 'reverts, renames and re-executes uncommitted migrations that conflict with already committed migrations' ...
Ruby Rails migration conflict re...
Explained here: http://www....
I have no idea how to creat...