Displaying 20 results from an estimated 800 matches similar to: "Want To Listen To Chad Fowler''s Keynote Presentation?"
2006 Jul 04
4
ROaR: A Ruby on Rails Podcast
I''m starting a new podcast to cover some of the hot topics going on in
Rails. Half news, half interactive, all community. As always, the
first episode kinda sucks but I''m looking forward to feedback from all
of you on how to make it better.
http://www.simiancodex.com/roar/
or for iTunes people
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=163609703
Michael
2006 Jun 09
2
Creating An Extra Association Between Two Tables
Good Friday Everyone :-).
These are my models:
Problem -> has_and_belongs_to_many :tags
Tag -> has_and_belongs_to_many :problems
Now if a tag does not exist and I create it and associate it to the
problem it works
self.tags << Tag.create(:name => tag)
But if I have the tag already in the DB and just want to link it to
another problem it does not really like me. I do it
2006 May 26
2
link_to and fragment identifiers
Fragment identifiers, it took me 30 minutes just to figure out what
they are called.
I would like to be able to create url that looks like this:
post/view/id#comments
How do I do that with a link_to function?
link_to "Comments", :controller => "post", :action => "view", :id =>
post.id ???
Thanks guys! :-)
John Kopanas
http://www.kopanas.com
2006 Jun 09
1
Updating Fields In Migration for HABTM Relationship
Earlier I forgot to add updated_at and created_at columns for my
HABTM relationship so I created a migration to add them. In the
migration I also want to go back and set the value of the created_at
and updated_at columns for the previous rows. What is the best way
to do that?
Initially I thought I was being smart and decided to put an UPDATE
SQL query in a find_by_sql statement and
2006 Jun 10
1
Validating Object Without Saving It
Is their a way to validate an object without saving it?
So I can do something like this
if user.save
else
end
But where save is just validating it but not actually saving it into
DB. I just don''t want to save the object yet.
Thanks guys and gals :-)
John Kopanas
http://www.kopanas.com
============================================================
http://www.soen.info - Index of
2006 Jun 10
3
Weird Problem With Active Record
Is it me or is my model getting the created_at from the wrong model!
I have a HABTM relationship between Problems and Tags. In one of my
controller I do the following:
def view
@tag = Tag.find_by_name @params[:id]
end
In my view I do this:
<% @tag.problems.each do |problem| %>
...
<%= problem.created_at %>
...
<% end %>
Now, how come the created_at
2006 May 23
2
HABTM for Dummies Question
Taking time off from programming is always painful :-).
I have the following Models:
====
class Tag < ActiveRecord::Base
has_and_belongs_to_many :problems
end
class Problem < ActiveRecord::Base
belongs_to :user
has_and_belongs_to_many :tags
end
====
And the following migrations:
====
create_table "problems" do |t|
t.column "user_id", :integer
2006 Jun 10
0
Ordering Based on created_at in HABTM relationship
I have the following line in my controller:
@tag = Tag.find_by_name @params[:id]
Now, how do I order the rows based on the HABTM relationship
problems_tags i.e. problems_tags.created_at DESC
Thanks :-)
John Kopanas
http://www.kopanas.com
============================================================
http://www.soen.info - Index of online software engineering knowledge
http://www.cusec.net -
2006 Aug 06
0
Rails Core Weekly July 16 - August 6
Rails Core Weekly July 16 - August 6
Rails Core Weekly summarizes the rails-core mailing list, a list
dedicated to Ruby on Rails internals and its development. RCW is
brought to you by Rodney Ramdas and proofread by the good people of
The Caboose (http://blog.caboo.se/) for accuracy.
RSS feed and RCW home:
http://www.pinupgeek.com/articles/category/rails-core-weekly-news
The ruby on rails
2006 Mar 20
4
Capistrano: cap show_tasks working but rake show_tasks not?
Does it make sense that if I type cap show_tasks it works but when I
type rake show_tasks I get:
rake aborted!
Don''t know how to build task ''show_tasks''
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1287:in `[]''
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:300:in `[]''
2006 Mar 20
2
Capistrano, ftp user and svn user are different
What do you do when the ftp login username is different then the svn
username?
Every time I try to deploy it gets stuck right here:
[kopanas.com] executing command
** [out :: kopanas.com] Authentication realm: <http://kopanas.com:80>
kopanas.com
** [out :: kopanas.com] Password for ''jkopanas'':
** [out :: kopanas.com] subversion is asking for a password
** [out ::
2006 Feb 13
3
Getting Rid of Error Divs around fields that have errors
Is there a way to get rid of the divs around an error field. These
divs are causing me headaches. Any suggestions :-)?
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
2006 Feb 13
2
Overriding the error_messages_for method
If I wanted to override the error_messages_for method where within
the rails structure would I put it? Which file?
Thanks :-)
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
2006 Feb 17
2
acts_as_versioned and acts_as_taggable on same model?
I am trying to use acts_as_versioned and acts_as_taggable (plugin) on
the exact same model. Has anyone successfuly done this? I think
what I need to do is make model_versions acts_as_taggable instead of
my main model. Anyone have any other suggestions or any suggestions
how to do this?
Your Friend,
John Kopanas
http://www.kopanas.com
2006 Feb 12
5
Passing Multiple Values In URL
Been a while since I programmed in Ruby and Rails and some of the
basic concepts I just loose so quickly. This one I can''t find any
examples of.
I want to pass two pieces of information in my URL. The :id plus I
want to pass my user_id. How do I pass it using the link_to?
Stupid question I know... but I can''t find the answer.
John Kopanas
http://www.kopanas.com
2006 Feb 11
2
Migrations and Unintialized Constants Error
I am running into a problem with two of my tables and the
"uninitialized constant" error when using migration.
I get the "uninitialized constant Note" when running the following
code in my migration file:
create_table :notes do |t|
t.column :id, :integer
t.column :noteshare_id, :integer
t.column :title, :string
t.column :covered, :string
2008 Nov 19
3
Rails.cache and problem with model id?
I have the following:
MODEL:
def self.get_tag_cloud
Rails.cache.fetch(''fetish_tag_cloud'', :expires_in => 1.hour) do
find(:all, :conditions => [ "approved_for_tag_cloud = true"], :order
=> "LTRIM(name)")
end
end
CONTROLLER:
def index
@fetishes = Fetish.get_tag_cloud
end
VIEW:
....
<% @fetishes.each do |fetish| -%>
2008 Dec 05
1
Question About Rails.cache and find method.
The DB load on my site is getting really high so it is time for me to
cache common queries that are being called 1000s of times an hour
where the results are not changing.
So for instance on my city model I do the following:
def self.fetch(id)
Rails.cache.fetch("city_#{id}") { City.find(id) }
end
def after_save; Rails.cache.delete("city_#{self.id}"); end;
def
2006 Feb 12
2
Using Random Longer Non-Sequential IDs
Instead of using sequential integers for IDs for my objects I was
wondering if I could easily make it so that my IDs where longer auto-
generated random strings/integers.
So instead of:
http://www.mydomain.com/user/view/1
Would be:
http://www.mydomain.com/user/view/d81096b87a7c5565f
On top of that... is there big benefits for security reasons to use
non-sequential numbers? Is it worth
2006 Feb 15
2
Ruby 1.8.2 work with Edge Rails
Does ruby 1.8.2 of ruby work with edge rails or do I need to upgrade?
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference