def filename
self.uri.split('/').last
...
C# Get the Filename segment o...
by jwmittag,
January 01, 2008 15:04,
11 refactorings, tagged with Comparison, Scott Porad, asp.net, DotNET, .net, C-Sharp, CSharp, C#, RoR, Ruby on Rails, rails, ruby
before: def list_for_blogentries(user) ...
Ruby Refactor my blog item helper
I have a helper to show all...
def favorite
message = Message.find params[:id]
...
Ruby Refactor my favorite action.
My code looks lousy, please...
- form_for :user, :url => users_path do |f|
%ul.register
%li
...
Ruby Help Refactor this into Rai...
I have no idea how to creat...
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 ...
Element.addMethods({
pngHack: function(el){
var el = $(el);
...
JavaScript pngHack
by getopenid.com/deleteme,
November 15, 2007 03:40,
1 refactoring, tagged with rails, image, png, img, prototype, hack
Makes 32 bit PNG's transpar...
<%= (@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....
On his Blog "Progress vs. P...