#rubyonrails - Thu 19 Apr 2007 between 00:00 and 00:12

NY Lost Funds



PhrogzYup. I hate the way it colorizes rhtml when I treat it as html, but it's better than NotePad :p
ikiiniohh ok..
hypnos22oDesk: that sounds like a job for your web server software
macographerikiini: you have to identify yourself every time you join the network
sixty4bitpstickne_: lol you ctrl lover you
saint_cyphercan I get an amen
pstickne_sixty4bit, actually it's the "Caps Lock" I love
lonnyikiini: And then if your username is still recognized, you are logged in.
macographersixty4bit: i use ScITE too
oDeskhypnos22: i did it already with crapy way in one line, but pstickne_ suggested url_for
saint_cypherPhrogz: use markaby instead of rhtml and that problem will go away
Phrogzbah
hypnos22oDesk: yeah that works fine i guess but seriously, you're not even interested in requests unless they're https, so maybe your server should be the one doing the redirects
lonnyikiini: It is sometimes possible for somebody to grab your nick when you are offline, then you have to grab it back... but if it is uncommon I wouldn't worry about it.
oDeskhypnos22: here what i did , if !request.ssl? redirect_to "https://" + request.host + request.request_uri ;return false; end
ikiinithanks..now i know...ok...my question...i have 2 models one controller...one of my models belongs_to the other...( the id is the foreigh key) I have a problem though...i have validation in my model..and i have to save one before i can save the other in order to join then( or get the id to pass to the other) thing is if the one waiting for the id fails validation the 1st still gets saved...
macographeri haven't done any customization to whitelist, or messed around changing the allowed tags/attributes and i'm wondering where in my app i should make those changes. in environment.rb or do i need to make a UI?
ikiinii need them to save together after they both pass validation...
hypnos22oDesk: that'll be faster than using url_for
Phrogzikiini - you need a transaction is what you're saying
ikiiniPhrogz: what is that?
what does that mean?
hypnos22heh
wikipedia.org/acid
pstickne_oDesk, crappy.
lonnyikiini: Use MyModel.create() rather than MyModel.new(). .create() will return you an id.
hypnos22http://en.wikipedia.org/wiki/ACID
pstickne_oDesk, in that case, check out the URI lib
ikiiniioony.: let me try that...
lonnyikiini: But it could be that you need a transaction as Phrogz states.
hypnos22even more to the point, http://en.wikipedia.org/wiki/Database_transaction
pstickne_oDesk, then just: redirect_to :protocol => "https"
lonnyikiini: I would try .create first.
pstickne_oDesk, maybe in a before filter (but I like hypnos22's idea about using the server and just blocking in the app)
ikiinigoign to do that now...
Phrogzikiini - http://api.rubyonrails.com/classes/ActiveRecord/Transactions/ClassMethods.html
ikiinigive me a sec
hypnos22oDesk: you're going to be running this filter before every request, regardless whether you do it in the server or in your rails app. might as well run it in your server, which will be faster than ruby (if it isn't webrick...heh) and will let you avoid the slight ugliness of your filter
AngryElfis it possible to use include? with a case/when structure?
oDeskhypnos22, pstickne_: thanks i'll consider apache vhosts like RubyPanther suggested too

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 

IrcArchive

NY Lost Funds