|
shopvac4christ posted:What's the 'proper' way to put it in a project of mine? I'd imagine stuffing it all in a 'lib/', pushing that directory onto my load path, and requiring them would work - but what if those projects update? Just replace the files in lib? Yes, and yes.
|
# ¿ Aug 23, 2007 00:37 |
|
|
# ¿ May 3, 2024 18:44 |
|
I've been using Ruby for a while now, but this is my first foray into Rails (I'm a big fan of Camping, but past a certain size Camping apps get difficult to handle). I want to be able to do this in a controller method: code:
code:
|
# ¿ Aug 30, 2007 18:17 |
|
Space Kimchi posted:"What if all the cool new features of modern browsers to make up for the lovely statelessness of the original HTTP1.0 were REMOVED and we COULDN'T USE THEM?" Because developing web applications just isn't a huge enough timesink, I guess we need to triple our effort and put arbitrary limitations on which standard web browser features we can use. Awesome. Also, no verbs. Statelessness isn't pointless. The most obvious benefit of REST is that it helps sites scale; you can farm out a site to many servers without having to worry about them sharing session data, and it makes your site more cacheable. HTTP is stateless by design, not because they couldn't have come up with something better. Also, RESTful authentication would be easy (even easier than session-based) if browsers would just get their acts together and put a decent interface on HTTP authentication.
|
# ¿ Sep 9, 2007 01:49 |
|
Space Kimchi posted:Some good replies here about REST, and I'm glad there's nobody being an insane zealot about it and having a rational discussion. Times like this it makes the $10 (times how ever many times I've been banned and bought/rebought features ) so worth it Hey, I wish there was a well-deployed stateful protocol too; then you could do things your way and I'd do them my way and it would become pretty obvious what architecture's better for what kind of problem, and application designers could focus on their applications instead of hacking around protocol design decisions, and protocol designers could focus on solving specific problems instead of defending their design decisions. quote:And yeah the statelessness of HTTP is why it became popular in a way. It's just less resources and easy to set up, but I think in applications. You just can't have an application without states, it's impossible. The trick is to keep the state on the client side; AJAX actually makes this very easy. quote:HTTP authentication makes your site look like it's a piece of poo poo from 1994. It's a damned shame; blame the browsers. Have you taken a look at continuation-based web frameworks like Seaside at all? Seems like it would be right up your alley.
|
# ¿ Sep 11, 2007 04:26 |
|
copla posted:This is my model: /blog.xml is an HTTP path, you want a path to that file on your hard drive. quote:I haven't had any issue opening and calling files from my stylesheets and my view files, from view I just do "/images/file.jpg" to call an image in public/images, but I can't do the same from model- when I do "/blog.xml" for it being in public/blog.xml, it doesn't work. You know how HTML and CSS work, right? When code in a view refers to /images/something.jpeg it's not actually opening that file, it just makes a reference to it in the HTML it generates, and the user's browser requests the file. Once you've figured out the correct path to use ("public/blog.xml" should probably work), you should just pass that straight to ruby-xslt, eg: code:
To process a remote file: code:
|
# ¿ Nov 11, 2007 16:27 |
|
What's the usual way of setting a page's title? All my pages use the same layout, I'm assuming I should put something like this in my layout:code:
|
# ¿ Dec 5, 2007 04:09 |
|
|
# ¿ May 3, 2024 18:44 |
|
Are there any guides for moving an application from 1.2 to 2.0 yet? I know there's a script that does some basic compatibility checking.
|
# ¿ Dec 15, 2007 20:43 |