[Rails] :lib in config.gem

2009-10-10 Thread Hunt Jon
Hi -- I'm confused what :lib in config.gem(). When do I need it to specify? What should I specify? I know that I need to put the name of the library, but the name is always the same with the gem name? Also do I need to add "require 'the_library'" when I actually use it somewhere in Rails? Or doe

[Rails] Re: Maintaining non persisted data

2009-10-10 Thread Marnen Laibow-Koser
Cris Shupp wrote: > Hi all, > > I have the following file below which is a controller inteneded to > maintain non persisted data. It has two routes defined by 'gather' and > 'show'. Gather displays a form and show, obviously, shows the non > persisted data. My problem is that initialize is cal

[Rails] SOAP

2009-10-10 Thread ericseijo
I have a project where I need to access NetSuite's SuiteTalk platform which uses a SOAP based web service. What would be the best way / Rails Way to go about this? Has anyone had any experience using soap4r? Any info would be greatly appreciated. Thanks! Eric --~--~-~--~~---

[Rails] Re: Client side validation - good, bad, or useless?

2009-10-10 Thread jko170
The problem I have found is its adding unnecessary work. If the server side has the validations, why do you need client side? Hitting the server is a non-issue as I believe most people fill out forms correctly on the first go. On Oct 9, 5:59 pm, wbr wrote: > I do both. Server-side is an obvious

[Rails] Re: Rails Routes using complex parameter names

2009-10-10 Thread Marnen Laibow-Koser
wbr wrote: > While I appreciate the feedback, it's not the direction I'm looking > for. This rails app is huge, with views and controllers designed > around a specific and complex structure. Adding controllers or > restructuring the controller/view architecture every time someone > wants to create

[Rails] Re: Rails Routes using complex parameter names

2009-10-10 Thread wbr
While I appreciate the feedback, it's not the direction I'm looking for. This rails app is huge, with views and controllers designed around a specific and complex structure. Adding controllers or restructuring the controller/view architecture every time someone wants to create a pretty route for a

[Rails] Re: Loading & Dumping of data in AR with Marshal

2009-10-10 Thread Matt Jones
On Oct 9, 5:50 am, Mat Harvard wrote: > Hey, > > I'm writing an application that stores models attributes in a single   > column called `data`, using Marshal. My ultimate goal is to allow any/ > all records to be saved in one database table. I'm wondering if   > there's a better way to do this,

[Rails] Re: Best RoR developer freelance tools

2009-10-10 Thread Rick DeNatale
On Fri, Oct 9, 2009 at 6:39 PM, Hassan Schroeder wrote: > > On Fri, Oct 9, 2009 at 1:12 AM, CNNN NICK > wrote: > >> Was wondering what are the tools that freelance developers are using to >> track time ... > > For time-tracking I like `punch` (gem) -- light and simple. Punch is nice, but is it

[Rails] Re: Rails Routes using complex parameter names

2009-10-10 Thread Matt Jones
On Oct 9, 5:24 pm, wbr wrote: > ... and I'm not in a position to change how the controller works or > redefine the expected incoming parameters. > > Thoughts or suggestions or workarounds? > Get a new gig. Seriously, any place that ties your hands like this isn't worth putting up with. If you

[Rails] AJAX/RJS Same as mailing address type function ...

2009-10-10 Thread Matt Do
Hello everyone! How are you doing? I am creating a rails app that handles customer records, etc. But, I am having trouble with some javascript/ajax stuff. When creating a customer, the employee will enter in the mailing address of the new client. After entering the mailing address it is time to e

[Rails] Re: difference scaffold model

2009-10-10 Thread Andreas Be
Mauricio Szabo wrote: > What exactly are you trying to do? > > On Oct 10, 1:35�pm, Andreas Benek Let say i generated an rail aplication with: rails proj ruby script/generate scaffold User name:string fullname:string ruby script/generate controller tasks definition rake db:migrate i can use 'r

[Rails] Re: XML into database

2009-10-10 Thread Marnen Laibow-Koser
jhaagmans wrote: > Hi, > > I've already talked about this in another topic, but I've found > another approach. > > We have some complex definitions and structures in our database and > I'd like to make it possible to simplify adding items to the > application. I'd like to do that using XML. Usin

[Rails] Re: XML into database

2009-10-10 Thread jhaagmans
Thanks for the tip! --~--~-~--~~~---~--~~ 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 ru

[Rails] Re: difference scaffold model

2009-10-10 Thread Mauricio Szabo
What exactly are you trying to do? On Oct 10, 1:35 pm, Andreas Benek wrote: > Hi, > > i am relativly new to Ruby and Rails. > My question is, why can't i use respond_to and session[:] in > ApplicationController created by a "ruby script/generate scaffold " > and in ApplicationController crea

[Rails] Re: How to protect against DoS?

2009-10-10 Thread Mauricio Szabo
Ok, thanks for the help. The problem is, there is no "slow action", it's just the login page, it sends one query to the database (10 records total), then redirects to a list of matters (it's just a "Matter.find(:all)). The problem I'm getting is precisely this: there is nowhere to optimize... The

[Rails] Re: Maintaining non persisted data

2009-10-10 Thread Marnen Laibow-Koser
[If you're replying point by point, please try to quote the lines you are responding to. It will make the discussion easier to follow.] Cris Shupp wrote: > Marnen, > > You are fast... > > Class variables... got it! ;-) :) [...] > I really do not want to use a yaml file. Some of the config

[Rails] Re: Maintaining non persisted data

2009-10-10 Thread Cris Shupp
Marnen, You are fast... Class variables... got it! ;-) I intend to spin off worker threads(or fork if need be) after the initial 'submit' button is pushed. Those workers will tend to the jobs at hand. Yes I meant library.rb (not perl)... I really do not want to use a yaml file. Some of the

[Rails] Re: 2.0.2 Postgres don't work

2009-10-10 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: >> `establish_connection': Please install the postgres adapter: `gem >> install activerecord-postgres-adapter` (no such file to load -- >> active_record/connection_adapters/postgres_adapter) > > Did you do this? > > gem install activerecord-postgres-adapter > > ? The er

[Rails] Re: form_for url.. how to send data to another controller

2009-10-10 Thread Cris Shupp
Erwin, If I understand what you are trying to do then I was trying to solve a similar but lesser problem. How to send form data from one method in a controller to another method in the same controller Iit does seem to work for your case though). Here is a sample erb: gather.html.erb Gatheri

[Rails] Re: Maintaining non persisted data

2009-10-10 Thread Marnen Laibow-Koser
Cris Shupp wrote: > Hi Marnen. > > Thanks for your reply. Here is what I am trying to do... > > We are trying to use mongrel as a job execution engine and use rails for > the front end GUI. I'm not sure I understand. Mongrel is just a Web server. Are you saying you have a Rails app that

[Rails] Re: 2.0.2 Postgres don't work

2009-10-10 Thread Fuat Geleri
Moreover you may need to add --prefix parameter to your commands, like this. [~/rails/helloblog]# rake db:migrate --prefix=$GEM_HOME -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[Rails] Re: 2.0.2 Postgres don't work

2009-10-10 Thread Fuat Geleri
Do you have more than one gems directory. I had a similar problem and solved it via setting the GEN_HOME variable to the personal gems install directory. The problem.. [~/rails/helloblog]# ./script/generate /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/connection_adapters/abst

[Rails] Re: Maintaining non persisted data

2009-10-10 Thread Cris Shupp
Hi Marnen. Thanks for your reply. Here is what I am trying to do... We are trying to use mongrel as a job execution engine and use rails for the front end GUI. We intend to have an initial configuration screen where the administrator will populate various properties in form for use in deter

[Rails] Re: Using auto_complete on multiple text_fields within a form

2009-10-10 Thread Norm Scherer
Paul Singh wrote: I've got a model with a number of attributes -- a bicycle with all of the various components on it. When the user enters the bike's make and model (among other things), I want to make sure that we don't duplicate a brand name (for example: Fuji is a single brand and it wou

[Rails] difference scaffold model

2009-10-10 Thread Andreas Benek
Hi, i am relativly new to Ruby and Rails. My question is, why can't i use respond_to and session[:] in ApplicationController created by a "ruby script/generate scaffold " and in ApplicationController created by "ruby script/generate model " i got errors like methode not know (for respond_to)

[Rails] Re: form_for url.. how to send data to another controller

2009-10-10 Thread Colin Law
2009/10/10 Erwin : > > @trainee is an instance of User class > > my form partial code : > > <% form_for :@trainee, :html => {:class => 'generalform'} do |form| %> >        <%= render :partial => "form", :object => form %> >         <%= form.submit "Register", :class => 'go' %> <%= link_to > 'Cance

[Rails] Re: autocomplete with extra data

2009-10-10 Thread Me
Anybody? this behaves like the select statement is not even there for some reason. On Oct 9, 3:39 pm, Chris Habgood wrote: > Ok here is the full code then. > <%= text_field_with_auto_complete :friend, :name,{:select => "NAME"}, > :after_update_element => "function(element,value){" + remote_func

[Rails] ArgumentError with Remarkable

2009-10-10 Thread Marnen Laibow-Koser
Hi everyone. The Remarkable Google group appears to be kind of quiet, so I thought I'd ask this here. I have an application using Rails 2.3.4, RSpec 1.2.9, and Ruby 1.8.7 (on Snow Leopard, in case that's significant). I thought I'd try to simplify some of my specs by installing Remarkable 3.1.1

[Rails] Re: Trying to learn if params can be modified

2009-10-10 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: >>> That part went fine, but now I'm having trouble >>> replacing the 2 digit year in params with the correct 4 digit value >>> before the create/update to the database. Please Help >> >> Just assign appropriately: >> params[:birth_year] += 1900 > > Careful. My kid was bo

[Rails] form_for url.. how to send data to another controller

2009-10-10 Thread Erwin
@trainee is an instance of User class my form partial code : <% form_for :@trainee, :html => {:class => 'generalform'} do |form| %> <%= render :partial => "form", :object => form %> <%= form.submit "Register", :class => 'go' %> <%= link_to 'Cancel', trainees_path %> <% end %> t

[Rails] Re: Trying to learn if params can be modified

2009-10-10 Thread Philip Hallstrom
>> That part went fine, but now I'm having trouble >> replacing the 2 digit year in params with the correct 4 digit value >> before the create/update to the database. Please Help > > Just assign appropriately: > params[:birth_year] += 1900 Careful. My kid was born in 2004... not 1904. He probabl

[Rails] Re: How to protect against DoS?

2009-10-10 Thread Tony
If you are using MySQLcheck your slow query log http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html This can also help you find slow actions: http://github.com/jtrupiano/slow-actions On Oct 10, 10:07 am, Brian Piercy wrote: > Mauricio, > As one poster suggested, Google 'Scaling Rails

[Rails] Re: Errors when freezing rails

2009-10-10 Thread Scott Werner
In case anyone comes across this problem still (I'm a sucker and still using 2.2) on vista64, the sleep(10) wasn't enough, but sleep(30) worked. Hope this helps anyone still having trouble. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You rec

[Rails] Re: Problem with oracle_enhanced adapter

2009-10-10 Thread xiexie11
You might try the oracle-enhanced list http://groups.google.com/group/oracle-enhanced they're generally pretty responsive. On Oct 9, 6:37 am, Rafael Roque wrote: > anybody? > -- > Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messa

[Rails] Re: How to protect against DoS?

2009-10-10 Thread Brian Piercy
Mauricio, As one poster suggested, Google 'Scaling Rails' for a good overview. My first option would be to look for page caching opportunities. Everywhere. Best, BrianP. On Oct 9, 7:38 am, Maurício Szabo wrote: > Hello, folks. > > We have a system that is used by all students on the university.

[Rails] Re: Editing "Tutorials"

2009-10-10 Thread Joe
I had to write a new path in routes.rb, it waas that simple. Fixed it all by myself and I feel good that I did it on my own! Thanks anyway guys, Joe On Sep 29, 6:12 pm, Joe wrote: > Hmm. ok, I suppose you have a vailid point. > > I will look through many articles and post back if I find a s

[Rails] Re: paperclip is not saving the files

2009-10-10 Thread about2flip
I'm getting this error for windows setup does this solution work? Going Gray trying to figure out why I am getting the error. THanks for your help. On Sep 4, 3:40 am, Rails List wrote: > Wasim Akram wrote: > > I've installed image magick. > > but it still shows the error message "/L

[Rails] Re: Javascript template, extension naming ?

2009-10-10 Thread Marnen Laibow-Koser
Teedub wrote: > It seems that I have a choice of > blah.js > blah.rjs > blah.js.rjs > and blah.js.erb > plus I guess blah.rjs.erb (maybe) > > I know that this is somewhat version dependent. > Which is the "bestest"? and is there a difference. Remember, the template naming format is: action.type.

[Rails] Re: Rails Routes using complex parameter names

2009-10-10 Thread Marnen Laibow-Koser
wbr wrote: > I have a search form that generates ugly but functional urls.The > controller takes nested parameters from the url like program > [program_id], or program[leader][leader_id]. > > So I'm trying to create a named route to make certain pre-defined > searches easier for customers to emb

[Rails] Re: Trying to learn if params can be modified

2009-10-10 Thread Marnen Laibow-Koser
Bob Smith wrote: > What I am trying to do is have the user enter a 2 digit birth year in > the view, then have the controller do it's magic and get a 4 digit > date for the birthday. That should probably be done in the model, not the controller. > That part went fine, but now I'm having trouble

[Rails] Re: Client side validation - good, bad, or useless?

2009-10-10 Thread wbr
I do both. Server-side is an obvious must. Client-side minimizes unnecessary hits on your server, and it has a better "feel" to the user. For example, if they neglect to fill in certain required fields, no reason to go all the way to your server and back to figure that out. On Oct 9, 2:55 pm, jk

[Rails] Using auto_complete on multiple text_fields within a form

2009-10-10 Thread Paul Singh
I've got a model with a number of attributes -- a bicycle with all of the various components on it. When the user enters the bike's make and model (among other things), I want to make sure that we don't duplicate a brand name (for example: Fuji is a single brand and it would suck to have Fuji, fuj

[Rails] Trying to learn if params can be modified

2009-10-10 Thread Bob Smith
What I am trying to do is have the user enter a 2 digit birth year in the view, then have the controller do it's magic and get a 4 digit date for the birthday. That part went fine, but now I'm having trouble replacing the 2 digit year in params with the correct 4 digit value before the create/upda

[Rails] Rails Routes using complex parameter names

2009-10-10 Thread wbr
I have a search form that generates ugly but functional urls.The controller takes nested parameters from the url like program [program_id], or program[leader][leader_id]. So I'm trying to create a named route to make certain pre-defined searches easier for customers to embed in their own pages