My Recent Pastes (97 and counting)

Pastes by celeretaudax (97 and counting)

Pages:

Below are the 15 most recent pasties by celeretaudax.

May 22, 2008
3:02AM EDT
by celeretaudax

# Auto-generated at Thu May 22 02:03:45 -0500 2008.
# Hand modifications will be overwritten.
# /home/zach/.RailsApps/rater/config/ultrasphinx/default.base
indexer {
  mem_limit = 256M

May 22, 2008
2:49AM EDT
by celeretaudax

  def results
    @search = Ultrasphinx::Search.new(:query => @query,
                                         :per_page => 25,
                                         :page => params[:page] || 1,
                                         :weights => {'lastname' => 2.0},

May 17, 2008
7:26PM EDT
by celeretaudax

##view

<div id="comments_area">
        <h3 id="comments_count"><%= pluralize(@article.comments_count, 'comment') %></h3>
        <% cache do %>

May 16, 2008
9:51PM EDT
by celeretaudax

 create_table(:suppliers), :id => false do |t|
   t.integer :id, :primary_key => true, :default => 0, :null => false
   # Other fields here
 end

May 14, 2008
10:08PM EDT
by celeretaudax

/*----------------------------------------------------------------------------*/
/*========================= make things a bit saner ==========================*/
/*----------------------------------------------------------------------------*/


May 14, 2008
11:30AM EDT
by celeretaudax

    <table class="hid_table2">
      <% form_remote_tag({:url => admin_charts_url, :method => :get }) do %>
       <tr>
        <td>
         <span class="key">

May 13, 2008
7:59PM EDT
by celeretaudax

  def test_ham_exclamation_point_updates_spam_status_to_ham
    @comment = Comment.create!(SPAM_COMMENTS[2])
    assert @comment.spam?
    @comment.ham!
    assert @comment.ham?

May 12, 2008
5:12PM EDT
by celeretaudax

##articles_controller.rb

  # PUT /admin/articles/1
  # PUT /admin/articles/1.xml
  def update

May 12, 2008
1:57AM EDT
by celeretaudax

validates_numericality_of :range_start, :if => Proc.new { |number| number.range_start < number.range_end })

May 12, 2008
1:53AM EDT
by celeretaudax

        validates_numericality_of :range_start, :less_than => :get_range_end


        def get_range_end
          self.range_end.to_i

May 12, 2008
1:30AM EDT
by celeretaudax

class AddDefaultAdmin < ActiveRecord::Migration
  def self.up
    user = User.new
    user.login = "evan"
    user.email = "evan.alter@gmail.com"

May 12, 2008
1:03AM EDT
by celeretaudax

## in config/routes.rb

above other maps

map.connect 'news/:action/:id', 

May 09, 2008
9:23PM EDT
by celeretaudax

class Post < ActiveRecord::Base

before_create :generate_slug

protected

May 09, 2008
12:42AM EDT
by celeretaudax

/*----------------------------------------------------------------------------*/
/*========================= make things a bit saner ==========================*/
/*----------------------------------------------------------------------------*/


May 08, 2008
11:35PM EDT
by celeretaudax

   1.
      view: index.html.erb
   2.
       
   3.

Next page

Previous page