Displaying 12 results from an estimated 12 matches for "techknow".
2009 Oct 12
2
yaml ?nodes? or nested maps
...pen(''user.yml''))
3 username = yml[''juixe''][''user'']
4 puts username
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$ nl user.yml
1 juixe:
2 user: juixe-user
3 pass: juixe-pass
4 techknow:
5 user: techknow-user
6 pass: techknow-pass
thufir@ARRAKIS:~/projects/rss$
thufir@ARRAKIS:~/projects/rss$
http://yaml.kwiki.org/index.cgi?YamlInFiveMinutesMinuteThree refers to
this structure as a nested map, FWIW. In either event, how would you
either iterate through the entire...
2009 Aug 24
5
extract keywords from string
hi -
i have strings that i need to extract keywords from. the string might
have html tags, urls, etc. i need to extract the keywords from the
string. i imagine i''m not the first guy to have to tackle this
problem. is there a gem i can use or anyone have any ideas how to
approach this?
thanks,
dino
2012 May 03
3
inheritance with rails.
Hello.
I''ve read about examples on inheritance with rails.
Here is an example:
http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/
The way is to add a type field in the table.
So if I have an Animal class with an attribute name, I can inherit
from this class like:
Dog < Animal, Cat < Animal, and so on.
With the type field in the table I can do Dog.all, Cat.all havin...
2010 Jun 19
0
re:Help needed act as commentable plugin urgent
Hi,,
I am facing problem during act as commentable plugin.
i had follwed these two links
http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/
http://juixe.com/techknow/index.php/2006/07/09/comments-on-acts-as-commentable/
error undefined method order in comment_methods.rb.
shall create commentable model?
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/51ac9daee...
2007 Jun 04
1
acts_as_rateable in Beast
...ng to implement acts_as_rateable to my Beast installation to
give users the option to rate posts (like reddit). I chose
acts_as_rateable as it supposedly easily allows reddit-type voting but
I''m having some problems setting it up and the documentation seems
outdated.
(http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/)
So far, I''ve added acts_as_rateable to my posts model and I''ve added
this method to my controller:
def vote_up
return unless logged_in?
rateable = @rateable_class.find(params[:id])
# Delete the old ratings for current...
2007 Jan 15
1
Using One Lookup Table for Multiple Model Properties
I have a model that has two properties that both come from the same
database table.
Let''s say I have a "Lead" model. This Lead has both a contact "State"
(as in Colorado, Arkansas, etc.) and a "Property State" where the house
he''s looking to refinance is located. Both of these should obviously
be objects of the type "state".
2007 Oct 31
0
another question about acts_as_rateable
I''ve been trying to add some rating capabilities to a site I''m
working on, I''ve been following a few tutorials (one being http://
www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/)
and I keep seeing something that''s confusing me.
---- from the tute : (in my ratings controller)
post = Post.find(params[:id])
post.add_rating Rating.new(:rating => 2)
If I place this in my code and update to match my models in my logs I...
2006 Sep 09
13
best way to add "created_by" entries to all tables???
Hi,
I want to automate somewhat the addition of created_by/updated_by fields
on my models (i.e. to include username). What''s the best/recommended
way to do this? Would it be to:
a) Find out how to extend the ActiveRecord::Base itself (I haven''t
extended a class before yet)
b) Use a plugin type approach where you have to add a tag manually to
each model file which then
2006 Jul 06
1
Multiple Keys in a Database Table
I''ve read previous posts to the list stating how Rails lacks multiple key
support for database tables, and how support is not planned. I''m OK with
that, but I''m wondering if there''s an elegant way to do what I need, for my
in-house customer relationship management tool:
I have an ACTIVITIES table. That table is a collection of individual, unique
activities
2006 Jan 27
4
acts_as_whatever
Hi there,
I love the acts_as_* family that rails uses. I''ve also found I can
create something similar by dropping the following code into my
activerecord classes:
class MyClass < ActiveRecord::Base
class << self
alias_method :count_with_unapproved, :count
end
def self.find(*args)
options = extract_options_from_args!(args)
if options[:conditions].nil?
options[:conditions] =
2007 Jun 13
6
ActiveRecord query using association
Hello all,
I apologize if the answer to this question is going to be rudimentary,
but I am thus far stymied by the information I have found on the web.
This seems like it should be simple, but I haven''t really found an
example of how to do this yet.
I have a model called Account which has a belongs_to reference to
another model, User, as below:
class Account < ActiveRecord::Base
2006 May 15
33
acts_as_commentable release
I now have the acts_as_commentable plugin up on RubyForge. This
plugin will allow you to add comments to any active_record object in
your Rails application.
So far the directions are simple, and there are only a few features:
To install:
ruby script/plugin install
svn://rubyforge.org//var/svn/commentable/acts_as_commentable
In the readme there is a sample migration you will need to use, with