[Rails] Re: puts & logger ... flush immediately

2010-01-18 Thread Michael Guterl
Marnen Laibow-Koser wrote:
> Ralph Shnelvar wrote:
>> newbie here ...
>> 
>> I am tracing logic putting puts and logger.info calls in my code.
>> 
>> I _think_ Rails is buffering output so that I can't see what happens
>> until I close out webrick.
> 
> But you are probably wrong.  If you watch the log scroll by, you will 
> generally see puts and logger output immediately.
> 
>> 
>> How do I tell Rails (or whatever) that output is not to be buffered?
> 
> You should not need to.
> 
> Also, get familiar with ruby-debug and test-first development.  These 
> two things will drastically reduce your need for logging.
>

Dude, don't be such a dick.  Logging doesn't necessarily have to do with
debugging or test-first development.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: active record multiple table inheritance with abstract parent

2009-08-09 Thread Michael Guterl

boblu wrote:
> I have four tables: jp_properties, cn_properties, jp_dictionaries and
> cn_dictioanries.
> 
> And every jp_property belongs to a jp_dictionary with foreign key
> "dictionary_id" in table.
> 
> Similarly, every cn_property belongs to a cn_dictionary with foreign
> key "dictionary_id" in table too.
> 
> Since there are a lot of same functions in both property model and
> both dictionary model, I'd like to group all these functions in
> abstract_class.
> 
> The Models are like this:
> 
> class Property < AR::Base
>   self.abstract_class = true
>   belongs_to :dictionry,
>  :foreign_key=>'dictionary_id',
>  :class=> ---ModelDomainName--- + "Dictionary"
> 
>   ### functions shared by JpProperty and CnProperty
> end
> 
> class Dictionary < AR::Base
>   self.abstract_class = true
>   has_many :properties,
>:foreign_key=>'dictionary_id',
>:class=> ---ModelDomainName--- + "Dictionary"
> 
>   ### functions shared by JpDictionary and CnDictionary
> end
> 
> class JpProperty < Property
>   :set_table_name :jp_properties
> end
> 
> class CnProperty < Property
>   :set_table_name :cn_properties
> end
> 
> class JpDictionary < Dictionary
>   :set_table_name :jp_dictionaries
> end
> 
> class CnDictionary < Dictionary
>   :set_table_name :cn_dictionaries
> end
> 
> As you can see from the above code, the ---ModelDomainName--- part is
> either 'Jp' or 'Cn'. And I want to get these string dynamically from
> the instances of JpProperty, JpDictionary, CnProperty or CnDictionary.
> 
> For example:
> 
> tempJpProperty = JpProperty.first
> tempJpProperty.dictionary #=> will get 'Jp' from tempJpProperty's
> class name and then apply it to the "belongs_to" declaration.
> 
> So the problem is I don't know how to specify the ---
> ModelDomainName--- part.
> 
> More specifically, I have no idea how to get subclass's instance
> object's class name within the parent class's body.
> 
> Can you please help me with this problem?

This is untested but worth a try.

class Property < AR::Base
  self.abstract_class = true
  def self.inherited(klass)
klass.to_s =~ /(\w+)[A-Z].*/
language = $1
klass.belongs_to :dictionary, :foreign_key => 'dictionary_id',
 :class => "#{language}Dictionary"
  end
end

class Dictionary < AR::Base
  self.abstract_class = true
  def self.inherited(klass)
klass.to_s =~ /(\w+)[A-Z].*/
language = $1
klass.has_many :properties, :foreign_key => 'dictionary_id',
   :class => "#{language}Property"
  end
end

Basically you have to delay the creation of the association until the 
subclass is created.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: how do you access params that are both model based and non model based?

2009-08-05 Thread Michael Guterl

Jonathan Gill wrote:
> Hi all
> 
> Ive got a form thats based on a model that I need to put a drop down
> box and additional text field to build the description for the item.
> 
> heres some quick code
> 
> View
> 
> <%= form_for (@shape) do |f| %>
> <%= f.text_field :description %>
> <%= select_tag "shape_name", "roundsquare option>triangular" %>
> <%= text_field_tag "shape_code" =>
> 
> 
> Controller
> 
> @shape.new
> @shape.description = params[:description]
> @shape.shape = "#{params[:shape_name]} #{params[:shape_code]}"
> @shape.save
> 
> What happens is I get the shape.shape set right (to the name from the
> select box and the code from the text field) but description is always
> empty,
> 
> Heres whats in the params when I do a raise shape.to_yaml to debug it.
> 
> {"shape_name"=>"triangular",
>  "shape_code"=>"shape code is here",
>  "order"=>{"description"=>"this is a description"}
> "shape_code"=>"342",
>  "shape_number"=>"111",
>  "finish1"=>"Silver",
>  "commit"=>"Create",
> 
> 
> Can someone point out how I should be accessing the params so I can
> set the description of the shape?
> 

Because you're using form_for it prefixes the form element names with 
the model name.  Which in your case must not be Shape, but Order, seeing 
that params[:order][:description] contains the description.

That is how you access the value by the way: 
params[:order][:description]

Honestly though, I'm really not sure why the description is going into 
params[:order], is Order really the model name?  I'm going to assume 
so...

Here's a brief, potentially correct explanation of how this all works.



This gets pulled into the params hash as params[:shape][:description]. 
Following this naming convention for your form items (or using f.select 
and f.text_field with form_for) will give you the ability to use this 
syntax:

@order = Order.new(params[:order])
@order.save

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: is using script/runner to run a daemon a good idea ?

2009-08-05 Thread Michael Guterl

Jedrin wrote:
> Suppose I have a daemon and I run it like this:
> 
> ruby script/runner script/my_daemon.rb
> 
> This gives my daemon full access to the rails environment, and it may
> run for days, months, many months or longer. I realized this could be
> risky if there is some caching or other issues, in which case I would
> launch some other external exec from the daemon instead perhaps to get
> access to the environment, or possibly I could launch it the same way
> and just do a fork and then do the DB operations in the child. Right
> now I am just running it as shown with no such strategy.

You may want to look into the daemons gem.  I've used it before and it 
allows you to start, stop and restart daemon processes.

http://daemons.rubyforge.org/

I think daemon-kit might be another option too but I haven't used it 
yet.

http://github.com/kennethkalmer/daemon-kit/tree/master

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Refactoring and Improving my Rake Task

2009-08-04 Thread Michael Guterl

bingo bob wrote:
> Hi Michael,
> 
> May thanks for this, just so you know, finding this very useful.
> 
> Just a few things.
> 
> 1) What's the general rationale for moving stuff out of the rake task 
> and into the heart of the app/model methods or lib dir - I guess it 
> leaves the rake task a lot cleaner really - fine with it, just wondering 
> about the rationale best practice. Makes the code useable throughout the 
> app?
> 

Re-usability and testability are the biggest factors in keeping this 
code in the corresponding class.

> 2) A mighty thanks for the FasterCSV.foreach(filename, :row_sep => 
> "\r\n") code, works perfectly, as you say I was having to "pre treat" my 
> CSV files beforehand, an extra and unnecessary step, this works a treat. 
> This code is now moved to the resort model in app/model/resort.rb, works 
> fine!
> 
> 3) Interpolation for resorts within the strong, rather than put + ' ' + 
> ' ' + etc, is more elegant I imagine. Done.
> 
> 4) Using the bang version of create, very useful to throw exceptions as 
> you say.
> 
> 5) If you get a chance to comment on the migration problem that'd be 
> useful - maybe I shouldn't worry about it. I was thinking to have the 
> migration be coded in pseudo-code such that.
> 
> - read the first row of the csv
> (I'll put data types in here, e.g. string, text, boolean)
> 
> - read the second row of the csv for the field names
> (e.g. name, serial_number, country)
> 
> - generate code such that the migration is created almost dynamically 
> like this t.[data type goes here] :[field name goes here]
> 
> However - maybe I'm overcomplicating matters and it's better just to do 
> the migration by hand just including the required fields.
> 
I would keep the migration just that, very simple.  No need to reinvent 
the wheel by adding extra pieces of data to your CSV.

> 6) I moved the database report to lib/database/report.rb, kind of worked 
> but I'm a little confused, what happened when I called it from the rake 
> task was that I got the output but on the end I had a "Class #223jjk" <- 
> somehting like that, listed on the end of the output. I got rid of it by 
> commenting out the def self.to_s and end statement, but I'm sure this is 
> incorrect. I was calling it from the rake task with simply puts 
> Database::Report.

Again, the whole Database::Report thing was just a poor example.  Just 
stick that code in whichever place you like.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Refactoring and Improving my Rake Task

2009-08-03 Thread Michael Guterl

bingo bob wrote:
> Oh, one other thing. Moving stuff to class methods makes sense I guess 
> as it makes the rakefile cleaner an I guess it's just the right thing to 
> do.
> 
> Where do I put stuff though and what syntax. I mean so I have a 
> resort.rb in app/models/resort.rb so I guess that's where the fastercsv 
> import method goes. What about he database report method, where can I 
> put that?
> 

Just stick the import_from_csv method in the resort model (I assume you 
already have this file).  Database::Report was just a lame example of 
one way to approach it.  You could put the code in any class you feel 
most appropriate.  If you wanted to use it as is, it could live at 
app/models/database/report.rb or lib/database/report.rb and either 
location would work with Rails dependency loading / mapping.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: how to ignore case in highlight() function?

2009-08-02 Thread Michael Guterl

Joao Silva wrote:
> how to ignore case in highlight() function?

Rails uses /i on when creating the Regexp for matching in the highlight 
method, this makes the regular expression ignore case.  So it seems it 
already behaves as you want.

http://github.com/rails/rails/blob/a147becfb86b689ab25e92edcfbb4bcc04108099/actionpack/lib/action_view/helpers/text_helper.rb#L110

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Background daemon

2009-08-02 Thread Michael Guterl

Penelope West wrote:
> It's sending e-mail every hour, but I changed to sleep for a day, but
> keep send the e-mail by hour. I don't know what to do to send daily.
> Could somebody help me?
> 
> 
> thanks
> 
> #  mailer.rb
> ###
> #!/usr/bin/env ruby
> 
> 
> # You might want to change this
> ENV["RAILS_ENV"] ||= "production"
> 
> require File.dirname(__FILE__) + "/../../config/environment"
> 
> $running = true
> Signal.trap("TERM") do
>   $running = false
> end
> 
> while($running) do
> 
> Notifier.deliver_report_daily
> #ActiveRecord::Base.logger.info "This daemon is still running at
> #{Time.now}.\n"
> 
> sleep 86400
> 
> end
> 
> ###
> # deploy.rb
> 
> desc "Stop daemons before deploying"
> task :before_deploy do
> run "#{current_path}/script/daemons stop"
> end
> 
> desc "Start daemons after deploying"
> task :after_deploy do
> run "#{current_path}/script/daemons start"
> end

I certainly would not use a long running daemon for this purpose.  You 
should look into using cron and script/runner to execute the task daily.

0 8 * * * /path/to/rails/app/script/runner -e production 
"Notifier.deliver_report_daily"

This will deliver your daily report each day at 8 am.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Refactoring and Improving my Rake Task

2009-08-02 Thread Michael Guterl
 resort_count = Resort.count
puts "Resorts : #{resort_count}"
advert_count = Advert.count
puts "Adverts : #{advert_count}"
user_count = User.count
puts "Users   : #{user_count}"
users = User.find(:all)
admin_count = 0
users.each do |user|
  if user.admin
count += 1
  end
end
# couldn't you use raw sql here?
# admin_count = User.count(:conditions => ["admin = ?", true])

puts "Admins  : #{admin_count}"
  end
end

require 'fastercsv'

class Resort
  def self.import_from_csv(filename)
count=0

# wrap in transaction in the event one of the resort's fails
# validation and raises an exception
Resort.transaction do
  # I see you were removing the newline characters with tr, I
  # changed your row_sep to "\r\n" thinking that might help.
  # However if that does not work I would load the string up in
  # ruby and perform the transformation with a regexp, then pass
  # it off the the appropriate FasterCSV method for a string.
  FasterCSV.foreach(filename, :row_sep => "\r\n") do |row|
# name,serial_no,region = row
# use ! (bang) version of create to throw exception if
# validation fails, helpful with transactions
Resort.create!(:name => row[0],
   :serial_number => row[1],
   :country => row[7],
   :resort_height => row[16],
   :overview_review => row[141],
   :region => row[6],
   :continent => row[8],
   :coordinates_east => row[10],
   :coordinates_north => row[11],
   :travel_to_review => row[146])
count += 1
puts count.to_s + "#{count} Resort name: #{row[0]}"
puts "Resort created : " + row[0]
  end
end
puts "-"
puts "Resorts created : #{count}"
puts "-"
  end
end

namespace :peaklocation do

  desc "Count the resorts in the database"
  task :database_report => :environment do
puts Database::Report
  end

  namespace :resorts do

desc "Load up all the resorts from resorts1.csv into #{Rails.env} 
database"
task :load => :environment do
  filename = ENV['FILENAME'] || "#{RAILS_ROOT}/db/resorts1.csv"
  Resort.import_from_csv(filename)
  Rake::Task["peaklocation:database_report"].invoke
end

desc "Delete all the resorts from the #{Rails.env} database"
task :unload => :environment do
  Resort.delete_all
  Rake::Task["peaklocation:database_report"].invoke
end

desc "List all the resorts from the database"
task :list => :environment do
  Resort.find(:all).each do |resort|
puts "#{resort.id} #{resort.name}"
  end

  Rake::Task["peaklocation:database_report"].invoke
end
  end

  namespace :adverts do
desc "Load up all the advert_types into #{Rails.env} database"
task :load_advert_types => :environment do
  adverts = [["Accomodation", "Accom"],
 ["Food", "Food"],
 ["Ski Hire", "Ski Hire"],
].each do |name, description|
AdvertType.create!(:name => name, :description => description)
  end
end
  end

  namespace :users do
desc "Make a user admin in #{Rails.env} database"
task :make_admin => :environment do
  username = ENV['USERNAME'] || ENV['username']
  raise "Must specify USERNAME=" unless username
  user = User.find_by_username(username)
  if user
puts "#{user.username} found"
u.admin = 1
puts "#{user.username} set to admin"
u.save
puts "#{user.username} saved"
  else
puts "#{username} not found"
  end
end
  end
end

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Cannot seem to include my own module & classes into Rails ap

2009-08-02 Thread Michael Guterl

Doug Livesey wrote:
> Hi -- I've got a class called SF::SOAP that gets defined at
> /lib/wsdl/sandbox/defaultDriver.rb
> It is defined like:
> 
>   module SF
> class SOAP
>   # ...
> end
>   end
> 
> How do I include this in my Rails app so that I can (for instance) call
> SF::SOAP.new without getting an unintitialised constant (for SF) error?
> I've tried direct requires, adding to the config.load_paths in the
> environment files, adding to the $: array, all to no avail.
> I did something similar years ago, but I'm damn'ed if I can remember
> how, so any help would be very gratefully received.

Rails' dependency loading mechanism will automatically pick up SF::Soap 
if it is in the following location: /lib/sf/soap.rb

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Spreadsheet -avoid reading and writing from file how?

2009-04-15 Thread Michael Guterl

Sijo Kg wrote:
> Hi
>I am using http://spreadsheet.rubyforge.org/ in my application..Usage
> like
> 
> book = Spreadsheet::Workbook.new
> 
> book.write "#{RAILS_ROOT}/public/uploads/excel-file.xls"
> render :file => "#{RAILS_ROOT}/public/uploads/excel-file.xls"
> headers['Content-Type'] = "application/vnd.ms-excel"
> headers['Content-Disposition'] = "attachment; filename=excel-file.xls"
> headers['Cache-Control'] = ''
> 
>In the above i am writing to a file in a location and then read.
> My question is is there any method so that writing to a file can be
> avoided ..Because if there are some 100 requests the file will be
> overwritten(Am I right?) or if give seperate names for the files the
> upload folder will grow..So is there alternative and i can read the same
> content directly
> 

I didn't test this code, but looking at the api it looks like 
Workbook#write will take an IO stream.

require 'stringio'
require 'spreadsheet'

book = Spreadsheet::Workbook.new
blob = StringIO.new("")
book.write blob

send_data blob

Be sure to checkout the link below on send_data, it will allow you to 
transfer the stream of data without writing it to disk first.

http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000402

Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails 2.3

2009-04-15 Thread Michael Guterl

Binh Ly wrote:
> Hello,
> 
> I've been looking on the Internet for how to use libxml within Rails.
> What I'm seeing is a little confusing.  If you install the libxml gem,
> will Rails automatically use that because its installed or do you have
> to explicitly set libxml to be the default after you've installed it?
> 
> This posting
> 
> http://www.coffeepowered.net/2009/03/16/things-to-do-when-upgrading-to-rails-23/
> 
> Says to set this in the environment file.
> 
>1.
>   ActiveSupport::XmlMini.backend = 'LibXML'
> 
> But when I do that my app crashes.  Anyone have any experience with
> this?
> 
If you could provide the entire backtrace, it would be much easier to 
diagnose.

Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: ActiveRecord shared models

2009-03-19 Thread Michael Guterl

Starr Horne wrote:
> On Thu, 19 Mar 2009 15:44:47 +0100
> Michael Guterl  wrote:
> 
>> I'm attempting to build a somewhat non-standard architecture around the
>> Rails apps that I'm building for a customer.  We're looking for a way to
>> be able to share models across projects using RubyGems.
> 
> Have you tried the new plugin system in rails 2.3? It may not be exactly 
> what you're looking for, but it allows you to have models in plugins.
> 

We have looked at this as a potential solution, however, it does not fit 
our requirement of being able to use models outside of the full Rails 
stack.

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] ActiveRecord shared models

2009-03-19 Thread Michael Guterl

I'm attempting to build a somewhat non-standard architecture around the
Rails apps that I'm building for a customer.  We're looking for a way to
be able to share models across projects using RubyGems.

The reasons we want to take this approach are:
1) Shared model logic, without duplication
2) Quick development of new applications
3) Small test suite per application
4) Mini-apps (potentially non-web) without full rails stack

I have seen solutions related to symlinking the app/models folders into
each application or using svn:externals, but these both seem suboptimal.

Ideally, I'd like to be able to:

require 'rubygems'
require 'models'

and have access to any of my models.

I have experienced some headaches with plugins and I expect to see more.
Does anyone have any suggestions for implementing this type of
architecture or am I doomed to have one monolithic Rails app?

Best,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] [ANN] First Cincinnati.rb Meeting

2008-11-12 Thread Michael Guterl

If you live in or near Cincinnati, love Ruby and want to get together to
talk and do some hacking, please join us.

Date:  Every Tuesday (Except the 1st Tuesday of the month, in deference
to the excellent Agile Round Table meetings)
Time:  6:30pm
Place: RecruitMilitary HQ, 422 W. Loveland Ave. Loveland, OH 45140

More information at http://cincinnatirb.org
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Convert Illustrator file to HTML or CSS for programming on Ruby?

2008-10-18 Thread Michael Guterl

carladeluxe wrote:
> HI there,
> 
> My graphic designer and my programmer are having a communications
> snafu, and it's my job to translate.
> 
> The programmer is saying that if there's a simple conversion method to
> take web page designs created in Illustrator and convert them to HTML
> or CSS, it will save him about 50% of programming time.
> 
> This is good news for everyone, but how best does the conversion
> happen?
> 
> Thanks for your consideration.
> 

I don't know of any tool that provides this...

Isn't this partially what you're paying your programmer to do anyways?

Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: press enter to login

2008-10-18 Thread Michael Guterl

Applejus wrote:
> Hi there,
> 
> I have  a login form and would like to know if there's a way to let the 
> user
> press enter to submit the login information as an alternative to 
> clicking
> the login button.
> 

This is really a JavaScript question...

http://www.htmlcodetutorial.com/forms/index_famsupp_157.html

Or more results from google:
http://www.google.com/search?hl=en&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=3KH&q=javascript+submit+form+on+enter&btnG=Search

HTH,
Michael Guterl
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---