#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11
Top Prev 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 Next
#rubyonrails
<tavilach> THANK YOU!!!
<tavilach> :-D
<jstew> w00t
<wilfordbrimley> Skiz: ok, yeah i'm using a polymorph for roles on the site, but was trying to figure out a way different objects could associate with each other as favorites...didn't think of sti...thx
<tavilach> o so i dont need to pass any locals at all anymore?
<Skiz> wilfordbrimley: I have a favorites plugin
<Skiz> its poly
<jstew> I do not think so tavilach
<tavilach> lol ur right
<wilfordbrimley> Skiz: awesome.. you hav ea link
<wilfordbrimley> ?
<tavilach> so an instance variable...
<tavilach> basically means...
<Skiz> lemme see if I can find the url. http://svn.webwideconsulting.com/svn/acts_as_favorite
<tavilach> i know what an isntance variable is, but how did that fix it
<tavilach> in other words, why did i not need to pass any locals
<jstew> instance variables are available anywhere in your controller class for the scope of the request/response lifecycle
<Skiz> wilfordbrimley: its pretty popular, I get lots of feedback on it.
<wilfordbrimley> Skiz: thx!
<jstew> so as long as you have a variable with @ in front of it you can use it anywhere in your controller or view, it does not go out of scope until your request is done
<Skiz> has some sexy dynamic methods too
<wilfordbrimley> Skiz: checking it out now.. i like the design on the svn browser..really clean
<wilfordbrimley> rad
<tavilach> o ic
<tavilach> and can you explain why :id => @joke works
<tavilach> i dont understand why @joke is an id
<jstew> I think thats rails magic tavilach
<tavilach> lol
<tavilach> would @joke.id
<tavilach> work for that too
<viewlogic> yes
<jstew> yes
<Skiz> wilfordbrimley: not bad for my 1st try at xsl? tried to make it match my site.
<tavilach> ic
<tavilach> whats better style?
<mod_cure> .map(&:name) <-is that the same as .map |name| { puts name } ?
<jstew> i use @joke.id myself, but either is fine
<tavilach> cool
<wilfordbrimley> Skiz: yeah i dig it
<tavilach> im gonna do that too
<tavilach> more readable
<tavilach> wow, ruby is weird
<argv[]> mod_cure {|name| puts name }
<argv[]> mod_cure no.
<mod_cure> thxs
<argv[]> [1,2,3].map(&:method) is :method sent to all objects in the collection
<argv[]> so .map {|x| x.method }
<argv[]> no putting of the s
<mod_cure> thxs
<wcdevel> I would like to allow users to use some basic HTML code in message posts and other instances... however, I want to disallow javascript of any kind. Does anyone know of source for javascript filter libs?
Previous Page Next Page