Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
GroceryBagHead
Nov 28, 2000

I found this very useful when you need to sandwich a custom method that should be called when calling existing Rails method yet being able to still use it later on... Sorry, this sounds confusing...

Read this: alias_method_bling http://errtheblog.com/post/1109

Adbot
ADBOT LOVES YOU

GroceryBagHead
Nov 28, 2000

Looks to me like Zed Shaw is an rear end in a top hat of massive proportions. Me? Oh, I'm just a nobody. But at least my ego can squeeze through doors.

GroceryBagHead
Nov 28, 2000

Never seen anything like that. Also you have shitloads of tests going on there. How long does it take to run and why so many?

GroceryBagHead
Nov 28, 2000

Well, for general api reference http://rails-doc.org is awesome. Hopefully it will be as good as php.net one day.

There's pretty significant jump from 2.0 to 2.1 so old 1.* rails are almost irrelevant. http://weblog.rubyonrails.org/ is pretty alright if you want to follow wtf is happening (although most of the discussion is about Edge Rails that takes a bit to become stable). But for 2.1 changes check this out: http://weblog.rubyonrails.org/2008/6/10/free-rails-2-1-book

GroceryBagHead
Nov 28, 2000

NotShadowStar posted:

Smallest I've done recently is a basic data collection form with a few fields. With templates it took about 15 minutes from 'rails fartlicker' to adding a Mongrel service to a production server.

For super small there's always PHP, but everything I've ever done has never stayed super small despite the initial conversations so personally I'll do Ruby-CGI or Camping+AR unless there's a dire need for PHP.

And if you used Passenger it would be even faster.

GroceryBagHead
Nov 28, 2000

CHRISTS FOR SALE posted:

:words:

It's a great idea, especially in early stages of dev / beta releases you can live with a really basic admin views. It really doesn't take very long to implement, but if there was an option to skip it...

Few things though:
1. Why not use it as an Engine? I don't see why you need to generate craploads of views and controllers in the app itself. Let user override defaults if he wishes though.
2. @models = Model.all(:table => RAILS_APP) How does that even work? I checked documentation just to be sure, but there's nothing like this there. Plus, wouldn't you just want AR models?
3. Tests. If there are no tests - it doesn't work.

GroceryBagHead
Nov 28, 2000

CHRISTS FOR SALE posted:

I'll look into it. What I was trying to accomplish was something that would be easy to implement, a 3-step process that doesn't REQUIRE any dependent plugins.

Maybe you're thinking about old 3rd party Engines. Rails 2.3 has that functionality built in: http://railscasts.com/episodes/149-rails-engines

So instead of your 3-step process there's only one step: install gem.

GroceryBagHead
Nov 28, 2000

You don't know how much you hate Mongrel until you need to do a rolling restart on a cluster of 4 app servers with 4 processes on each while fighting with Monit so it doesn't kill newly created mongrel processes. Passenger is just a must now.

GroceryBagHead
Nov 28, 2000

Pardot posted:

The gemcutter transition was really fast, like a month tops. Yet as a community we still haven't really embraced 1.9 :smith:

Few things helped: Github gem hosting went tits-up and Github recommended Gemcutter as an alternative. Rubyforge was good for nothing other than being 'official' gem repository. Eventualy guy behind Rubyforge agreed that Gemcutter will server better for hosting gems. .. and then rubygems started to use Gemcutter as default.

Adbot
ADBOT LOVES YOU

GroceryBagHead
Nov 28, 2000

Try skipping :url thing completely. Rails sometimes is smart enough to figure out it:

code:
- form_for @page do |f|

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply