search for: aktxyz

Displaying 14 results from an estimated 14 matches for "aktxyz".

Did you mean: abcxyz
2006 Oct 28
2
anything rails based app like pligg or digg out there ?
I am wanting to do something like digg but internally at our company and am looking for a rails based starting point. There is something out there called pligg which seems pretty good, but it is PHP based and I expect to be making quite a few changes/additions, so would really prefer a project based on rails ! - hope to hear from you --~--~---------~--~----~------------~-------~--~----~ You
2007 Jan 25
2
render .rhtmlx if present, otherwise render .rhtml
We have a product where our customer is "allowed" to make minor changes to the .rhtml views. Obviously, this can be an issue when updating the software, as changes need to be merged in. Also, sometimes the customer wants to back out there change but no longer has the original file. SOOO.... I''d like to tell them - if you want to change a .rhtml file - just copy it to
2006 Dec 29
1
development, test, production ... how about stage
I find a "mode" is missing when I iterate on my rails apps... Specifically, right before production, I want to run on my development machine as if I am in production mode. It mainly boils down to this... - I want the production setup (caching, error handling, etc) - but I want my local machine DB (password, socket, etc) So I have been using an additional mode that I call stage. - just
2008 Feb 06
3
slogging my way thru oracle, not adapter? gem install fails?
<ubuntu_gutsy> me@ubuntu:~/workspace/oracle/ro$ gem install activerecord-oci-adapter Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find activerecord-oci-adapter (> 0) in any repository <ubuntu_gutsy> me@ubuntu:~/workspace/oracle/ro$ rake db:migrate (in /home/me/workspace/oracle/ro) rake
2006 Jul 11
0
auto_discovery_link_tag in a partial ?
I have a partial that has a link_to(image_tag()) for an RSS feed. I would like this feed to be auto discoverable (link tag in document head). The problem is that it is too late to stick something in the head of the document by the time I am rendering this partial. The auto_discovery_link_tag must be in the head of the doc. Any suggestions ? -- thanks, Andrew -- Posted via
2006 Nov 06
0
emit scaffold controllers ?
I would like to emit (thru eval) some controller code via a plugin. Basically the plugin will get the list of tables, and emit a controller with scaffold: for each table (model). Is it possible to do that somehow ? I can emit the proper code in a plugin, but the rails logic seems to only look for controller classes in the controller directory. - Thanks, Andrew
2007 Feb 26
0
mongrel_rails cluster::restart from within a controller ?
I need to have a button in my rails web app to allow and admin to restart the "''server", which for this app means restarting the mongrel processes. If I do... system(''mongrel_server cluster::restart'') it shuts down all my mongrels (3 in this case), and starts all but one of them back up. The one that does not start back up is the one that handled this
2007 May 24
0
reverse proxy holding onto port, complicated
I have a rails app that is behind a firewall and I need to be able to ssh into the box, so I do this... - create a reverse tunnel from the rails system to my system using ssh -R - ssh from my system to the rails system thru the reverse tunnel It works great ! But, if/when I restart my mongrel cluster, one of the mongrels always fails with an "port in use" error. I guess
2007 Oct 31
1
how does table_name static method work ?
There has to be a simple explanation for this. I can do this to get the table name behind a model >> User.table_name => "users" Great. But looking at the table_name code in active_record/base.rb, the table_name method is not static (no self.)! def table_name reset_table_name end So why can I call table_name as a static method ???
2007 Nov 28
0
OpenHash class I thought I would share...
I love OpenStruct, but it has no ability to iterate over the members. I had extended it, but recently I use this little class. Anyone see any issues with it ? class OpenHash < Hash def method_missing(name, value=nil) key = name.to_s.sub(/[=?!]$/,'''').to_sym self[key] = value if name.to_s[-1,1] == "=" return self[key] end end >> o =
2007 Dec 21
0
pretty neat Mash class (Magic Hash)
class Mash < Hash def method_missing(name, value=nil) key = name.to_s.sub(/[=?!]$/,'''').to_sym self[key] = value if name.to_s[-1,1] == "=" self[key] = Mash.new unless self[key] || value return self[key] end end Its like OpenStruct...so what can you do? require ''pp'' m = Mash.new m.first_name = "john" m.last_name =
2008 Jan 08
1
add comments to ALL models (ie automatically add has_many)
I have the acts_as_commentable and a bunch of others added to pretty much every model, is there a way to automaically add these to EVERY model ? I tried the following but it fails with an error... ActiveRecord::Base.class_eval do has_many :notes, :as => :model_with_notes, :dependent => true end fails with.... /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/
2008 Feb 21
1
polymorphic has_many from ActiveRecord::Base????
I have a polymorphic thingy called fields and I need to on each and every model, so I''d like to do the has_many from the base class, like this... ActiveRecord::Base.class_eval do has_many :fields, :as => :model, :dependent => true end It fails with this no method error (class_of_active_record_descendant) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/
2006 Aug 04
1
route error with controllers in a module, should just work
This is ALL I have added to my routes.rb map.connect ''admin'', :controller => ''/admin/welcome'' I have found plenty of examples saying this is correct if you have a WelcomeController in the Admin module, which I do :) But now webrick won''t even start ??? Look at those 4 colons ::::, what is that about ? help ! => Booting WEBrick...