Displaying 20 results from an estimated 22 matches for "chadfowler".
2006 Feb 21
7
Self-referencial habtm relationship
Heyo!
I am setting up a self-referencial habtm relationship with the users
of my app. I am using Chad Fowler''s "Rails Recipes" to get me started,
and everything works great with the join table "people_friends". I add
friends by doing somebody.friends << somebodyelse. However, with my
app, there is an approval process so my join table has columns
person_id,
2006 Feb 06
4
Relationship Question (STI)
My girlfriend and I have been dating for two years, and she just told me she
has an STI...
Actually, I currently have three different models, like: Dog, Whale, Monkey
They all have some similar attributes, but, they are unique enough to
break into their own models. I could use STI, but I think the table would
just have too many columns.
Now, I wanted to let the Dog''s, Whale''s
2006 Feb 06
6
ActionMailer - ROR Recipes - Multipart/alternative
I am using the SaltedHashLoginGenerator. and would like to send the e-mail in multipart/alternative format.
By default my application is using forgot_password_en.rhtml template.
I read in the ROR Recipes book
"ActionMailer sees these templates, recognizes the pattern in their
file names, and automatically sets the MIME type of the message to
multipart/alternative and adds
2006 Mar 08
4
Performance with many look-up tables
Hi,
I have an app - a first cut ROR - so it''s a bit of a mess. I''m now
trying to clean it up. The app relies on a heap of look-up tables that
are, by and large, static. I''m wondering where and how to initialise
these collections once - so that I don''t have to keep hitting the
database every time I start a new action.
Can I initialise the collections at the
2006 Feb 03
33
[ADV] Rails Recipes Beta Book is now available
I''m delighted to announce that Chad Fowler''s new book, Rails Recipes,
is now available
as a Beta Book.
This is a great title for folks who know Rails, and for folks who
want to get the most out of Rails. It contains detailed recipes for
doing real-world things with Rails, all illustrated with working
code. Some examples are drawn from Rails 1.1, the rest from Rails 1.0.
2006 Feb 06
35
ROR Recipes Beta
Yesterday I got the beta version of ROR recipes book and the recipes are great. For those of you still thinking about it, I highly recommend the book.
The only thing I wish is that if there were some more recipes (greedy me), especially AJAX related and installing an application within your current application.
For instance, it will be great to see how one can implement the typo blog
2006 Mar 08
3
migrations schema_info table, Rails Recipes Bug?
I have the rails recipes book and i was going through the migrations
recipe. Everything seemed to work except for the last part in trying to do
a rake migrate with a migration file version 1 and the schema_info version
set to 0. Without the force attribute, the rake migration fails, as
expected.
So the recipe says to run this:
ruby script/runner
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and
then used wget to look at the output the RJS template generates. This is
what I got:
try {
new Insertion.Bottom("list", "<li>Fox</li>");
new Effect.Highlight("list",{duration:1});
Element.update("header", "RJS
2009 May 05
9
no sql in the controller guideline
...ost of the times
contains
SQL code. like in this example from Rails Cookbook:
Employee.find :all, :conditions => [''hire_date > ? AND first_name = ?'',
''1992'', ''Andrew'']
does anyone have an opinion on this?
* complete post at:
http://www.chadfowler.com/2009/4/1/20-rails-development-no-no-s
--
Posted via http://www.ruby-forum.com/.
2006 Jun 13
0
[ANN/ADV] Rails Recipes is Shipping
...=pd_bbs_b_2_2/103-1790926-8876657?s=books&v=glance&n=283155)
if you prefer.
Thanks to DHH, the Rails Core team, and the many many contributors for
helping to make Rails Recipes something I''m very proud of.
See (some of) you at RailsConf next week!
Thanks!
--
Chad Fowler
http://chadfowler.com
http://pragmaticprogrammer.com/titles/fr_rr/ (Rails Recipes)
http://pragmaticprogrammer.com/titles/mjwti/ (My Job Went to India,
and All I Got Was This Lousy Book)
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over four million gems served!)
2006 Feb 09
0
OSCON Call For Proposals Deadline (Feb 13)
...proposal form is here:
http://conferences.oreillynet.com/cs/os2006/create/e_sess/
You can read more about OSCON here: http://conferences.oreillynet.com/os2006/
OSCON is a _lot_ of fun. Especially these days with Ruby''s increased
visibility. Hope to see you there!
--
Chad Fowler
http://chadfowler.com
http://pragmaticprogrammer.com/titles/fr_rr/ (Rails Recipes - In Beta!)
http://pragmaticprogrammer.com/titles/mjwti/ (My Job Went to India,
and All I Got Was This Lousy Book)
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over one million gems served!)
2006 Feb 08
2
helpers and plugins
First a helper...
Have a boolean field - on forms, it returns ''true'' or ''false''
It would be much nicer to have it say either ''yes'' or ''no''
is there a helper for this?
Where do I find a list of helpers beyond Agile book?
Secondly, plugins...
I know that I am going to have to look at authentication mechanisms and
2006 Jan 29
2
GetText and rjs templates?
hi,
is it possible that gettext don''t work with rjs templates?
i''ve just tried this simple example
blog_controller.rb :
class BlogController < ApplicationController
def index
end
def dosomething
end
end
index.rhtml :
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<div id="test">Some text to change
2005 Mar 02
1
gem install rails error
Can someone please give me a hand here? I have just built a brand new
RHEL 4 server for my company and I am trying to get rails up and
running on it. I have ruby 1.8.2 installed fine. And the gem install
process went fine as well. But when I try to do the gem install raisl
under the root user this is what I getL:
[root@yhrws root]# gem instal rails
Config file /root/.gemrc does not exist
2006 Apr 14
7
SHA2 Issues
Hello all,
Thank you in advance for your help with this. I am trying to implement
the user authentication method from Ruby Recipes which calls for the use
of SHA 2. Here is the code for the password:
def password=(pass)
salt = [Array.new(6){rand(256).chr}.join].pack("m").chomp
self.password_salt, self.password_hash = salt,
Digest::SHA256.hexdigest(pass + salt)
end
I open
2006 Jan 01
7
How to show progress
I''m looking for ideas on how you would implement a controller/view in
Rails that needs to show the progress of a possibly 2-3 minute
operation.
For example the user wants to generate 100 reports that will take about
3 minutes. I would like to have a page that would indicate that the
operation is taking place as well as showing progress as to how far
along. With basic CGI you could
2006 Feb 17
3
Migration Errors?
Hi there,
I just bought the Rails Recipes and PDF preview of the book. So far
it''s excellent. I decided to try Chapter 8 of the book regarding
tagging.
I''ve done migrations before, and I feel comfortable with them, however
this error stumps me.
--------------------------------------------------
antrover:~/RubyProjects/rlog dhoefler$ ruby script/generate migration
2006 Mar 31
6
Install rubygems error
I made the mistake of trying to upgrade to 1.8.4 from 1.8.2 and had intended
to upgrade to rails 1.1. I have now completely borked my ruby gems
installation. After installing ruby I get the following error when trying to
execute gem:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require__'': no such file to load -- zlib (LoadError)
from
2006 Aug 24
10
MongrelCluster - How can I make a request to a specific mongrel instance?
In our app we''ve a number of singleton ruby classes that cache static data
in hashes, things like
string values, system config params, etc). In a webbrick environment this
works ok, but we find
in production we have a problem because we have 4 caches, one for each
mongrel instance.
This also isn''t a BIG problem, but our cache.reload() methods are kinda
useless now, because
we
2006 Mar 06
46
Capistrano 1.1
Capistrano is a utility for executing tasks in parallel across
multiple remote hosts. It was formerly known as SwitchTower.
Installation:
gem install capistrano
Manual:
http://manuals.rubyonrails.org/read/book/17
Version 1.1 introduces a few changes:
* Renamed! Due to the trademark infringement debacle of last week, we
had to change the name. Moving forward it will be known as