[Rails] Params hash in rails

2008-09-11 Thread Sunny Bogawat
Hi, I want to know that how 'params' get created in rails? when http: request comes we have get all parameter using hash params e.g:- params[:id] But in ActionController how params get created and how it is initialised there? Also what is scope for params? Thanks. -- Po

[Rails] Re: An open source ruby on rails shopping cart

2008-09-11 Thread Emanuele Tozzato
good job! :) I will try it for sure! thanks On Thu, Sep 11, 2008 at 11:11 PM, Robert <[EMAIL PROTECTED]> wrote: > > Dear Ruby on Rails: Talk > > We released an open source shopping cart software written in ruby on > rails. > > For more details, please visit our website: > http://www.ecompages.c

[Rails] An open source ruby on rails shopping cart

2008-09-11 Thread Robert
Dear Ruby on Rails: Talk We released an open source shopping cart software written in ruby on rails. For more details, please visit our website: http://www.ecompages.com/ You can also take a look at a demo store: http://www.ecompages.com/demo/ Regards, Robert --~--~-~--~~---

[Rails] Re: ruby

2008-09-11 Thread Phlip
krishna wrote: > how to install and run ruby appllication. > I am new to ruby. Google "Ruby One Click Installer" and let the instructions take you from there. None of this stuff is hidden, and you really ought to read the book that comes with the installer before asking more questions! --~--

[Rails] Re: Problem with links in rails app - appending path after the text?

2008-09-11 Thread Ryan Bigg
Any plugins installed? - Ryan Bigg Freelancer Skype: radarlistener MSN & Gtalk: [EMAIL PROTECTED] On 12/09/2008, at 11:51 AM, DanielFischer.com wrote: > > anyone have any idea on why my links are rendering the path after the > actual links text? > > e.g: > > Sign Up NOW > > shows up in

[Rails] Re: How to turn an account page to pdf format?

2008-09-11 Thread Christian Rishøj
Have a look at this: http://wiki.rubyonrails.org/rails/pages/Rails+PDF+Plugin Christian On Thu, Sep 11, 2008 at 5:11 PM, Murray <[EMAIL PROTECTED]> wrote: > > In my site, I want to make some account page in pdf format. > Is there a good way to turn html view into pdf view? > > > --~--~-

[Rails] Re: Can't I call a private method from a self.method

2008-09-11 Thread Christian Rishøj
You need to declare your "split_name_and_email_array" method as a class method: def self.split_name_and_email_array(name_email_array,pb) # ... end Christian On Thu, Sep 11, 2008 at 10:34 AM, Sijo Kg <[EMAIL PROTECTED]> wrote: > > Hi > I have in MailSending class > def self.send_mail_to_al

[Rails] Re: Sending a file to a user

2008-09-11 Thread Christian Rishøj
No need to save your data in a file. Just use send_data [1]. Christian [1] http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000624 On Thu, Sep 11, 2008 at 7:11 PM, Michael Lavrisha <[EMAIL PROTECTED]> wrote: > > Hello, > > In my application I would like the user to download

[Rails] Re: Problem with set_table_name and custom method in model

2008-09-11 Thread Christian Rishøj
I recall having a similar problem. I believe I got around it by overriding the table_name method on the class, e.g.: class Vehicule < ActiveRecord::Base def self.table_name "table_a" end end Christian On Thu, Sep 11, 2008 at 7:15 PM, Rémi Gagnon <[EMAIL PROTECTED]> wrote: > > Hi, > > Whe

[Rails] Re: Running a specific migration

2008-09-11 Thread Christian Rishøj
On Fri, Sep 12, 2008 at 1:02 AM, Adam <[EMAIL PROTECTED]> wrote: > I'm working on a large rails projects that has a lot of migration > files (around 80). Through some development quirk, probably due to bad > svn merging, my local database hasn't run migration 63. Is there a way > to run this one

[Rails] Re: Version of rails app

2008-09-11 Thread Christian Rishøj
You could use an SVN keyword to insert the current revision in a file. Put '$Revision$' in one of your files, then: $ svn propset svn:keywords Revision to enable expansion of the keyword in your file. Then, by looking in this file, you can determine which revision is in use. Christian On T

[Rails] Re: Route segment ":controller" cannot be optional because it precedes a required segment.

2008-09-11 Thread Danimal
Dave, Did you ever get any resolution on this? I'm just now having exactly the same problem. I'm doing a filter though: map.namespace :admin do |admin| admin.filter ':controller/filter', :action => 'filter' end I wonder if there is some additional command-line hash option or parameter that ca

[Rails] Re: Page does not display

2008-09-11 Thread Conrad Taylor
Can you post the relevant Ruby code? Sent from my iPhone On Sep 11, 2008, at 6:10 PM, "Hassan Schroeder" <[EMAIL PROTECTED] > wrote: > > On Thu, Sep 11, 2008 at 1:46 PM, Shandy Nantz > <[EMAIL PROTECTED]> wrote: > >> What's happening is that I have this before_filter that set some >> flags

[Rails] Re: Page does not display

2008-09-11 Thread Hassan Schroeder
On Thu, Sep 11, 2008 at 1:46 PM, Shandy Nantz <[EMAIL PROTECTED]> wrote: > What's happening is that I have this before_filter that set some flags > and then returns. I pass an id along so I can instantiate a User object > and then save the set conditions of these flags. It is going through the >

[Rails] pls help me install this plugin (acts_as_activity_logged)

2008-09-11 Thread rubynuby
the plugin is here http://aaal.svn.fearoffish.com/browser I followed the install instruction in the README but nothing happened. The readme must be outdated. However, I can't figure out how to grab it from the new address. Thank you in advance --~--~-~--~~~---~--~-

[Rails] Re: Rails Architecture,big app or multiple small app

2008-09-11 Thread Mikel Lindsaar
On Fri, Sep 12, 2008 at 7:14 AM, Diego Bernardes <[EMAIL PROTECTED]> wrote: > what is the difference of activeresource and this activemessaging? i > dont know activemessaging... > have any pros comparing with activeresource? Unless you are insanely huge, one app will always be faster. This is be

[Rails] Running a specific migration

2008-09-11 Thread Adam
Hi all, I'm working on a large rails projects that has a lot of migration files (around 80). Through some development quirk, probably due to bad svn merging, my local database hasn't run migration 63. Is there a way to run this one file without having to roll back through all the later migrations

[Rails] Ruby on Rails Developer - AVAILABLE

2008-09-11 Thread billchalam
Hi Partners, Resume of Ruby on Rails developer - B.R. Summary: �X Around 5 years of software development experience involving Object Oriented Programming, Web-based technologies. �X Full life cycle software development experience – requirements gathering, analysis, design, development a

[Rails] Re: How to track down never-ending requests

2008-09-11 Thread Hassan Schroeder
On Thu, Sep 11, 2008 at 2:05 PM, Jack Christensen <[EMAIL PROTECTED]> wrote: > Does it happen on a certain action or when accessing actions in a > certain controller? > > That's what I'm trying to find out. The request never finishes so examining > the log file is of limited help. Put logging st

[Rails] Re: time value won't come back from UTC

2008-09-11 Thread Conrad Taylor
On Thu, Sep 11, 2008 at 10:42 AM, Stuart Corbishley <[EMAIL PROTECTED]>wrote: > > Hi there, > > I'm fairly new to RoR, and I seem to be having a problem with :time > types. > > I save my times with a time_select on my form, to a time type field on > MySQL. > > Rails automatically pulls it back to

[Rails] Re: Rails Architecture,big app or multiple small app

2008-09-11 Thread Diego Bernardes
what is the difference of activeresource and this activemessaging? i dont know activemessaging... have any pros comparing with activeresource? thanks again :) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: How to track down never-ending requests

2008-09-11 Thread Jack Christensen
Srdjan Pejic wrote: > Does it happen on a certain action or when accessing actions in a > certain controller? > That's what I'm trying to find out. The request never finishes so examining the log file is of limited help. > On Sep 11, 4:17 pm, Jack Christensen <[EMAIL PROTECTED]> wrote: > >>

[Rails] Re: Page does not display

2008-09-11 Thread Shandy Nantz
Frederick Cheung wrote: > find out why that filter is returning false. > > Fred What's happening is that I have this before_filter that set some flags and then returns. I pass an id along so I can instantiate a User object and then save the set conditions of these flags. It is going through th

[Rails] Re: How to track down never-ending requests

2008-09-11 Thread Srdjan Pejic
Does it happen on a certain action or when accessing actions in a certain controller? On Sep 11, 4:17 pm, Jack Christensen <[EMAIL PROTECTED]> wrote: > Occasionally, my server gets nearly completely unresponsive. Nearly the > entire CPU usage is spent in IO wait. I'm forced to kill the ruby > pro

[Rails] How to track down never-ending requests

2008-09-11 Thread Jack Christensen
Occasionally, my server gets nearly completely unresponsive. Nearly the entire CPU usage is spent in IO wait. I'm forced to kill the ruby processes to get the server back up. The log files are not very useful because the request never finishes so I can't simply search for requests that took at

[Rails] Re: Page does not display

2008-09-11 Thread Frederick Cheung
On Sep 11, 9:19 pm, Shandy Nantz <[EMAIL PROTECTED]> wrote: > I have these profiles for over a thousand users, and these profiles hold > addresses, phone numbers, etc, etc. Every profile works just fine except > for one that when the appropriate link is clicked I get a blank page. > When I look

[Rails] Re: Getting a list of models, AND custom model directory

2008-09-11 Thread Frederick Cheung
On Sep 11, 8:00 pm, Mozmonkey <[EMAIL PROTECTED]> wrote: > I'm building an a client/web application that will rely on custom, > simple plugins that will be written as models with single table > inheritance to a Widget class.  Ideally somebody would just need to > create a simple model which exte

[Rails] Page does not display

2008-09-11 Thread Shandy Nantz
I have these profiles for over a thousand users, and these profiles hold addresses, phone numbers, etc, etc. Every profile works just fine except for one that when the appropriate link is clicked I get a blank page. When I look at the logs files I get the following error: Filter chain halted as [

[Rails] Re: persistent_disabled = true but still querying the DB

2008-09-11 Thread apm
Sorry, got confused and thought to be posting this in backgroundRb list... On 11 sep, 20:57, apm <[EMAIL PROTECTED]> wrote: > Hi, > > i have set this in my config file: > >   :persistent_disabled: true > > But backgrounDrb still queries the DB every few seconds. > I have also tried setting the f

[Rails] persistent_disabled = true but still querying the DB

2008-09-11 Thread apm
Hi, i have set this in my config file: :persistent_disabled: true But backgrounDrb still queries the DB every few seconds. I have also tried setting the following: :persistent_delay: 60 :persistent_disabled: false I would expect it to check now the DB every 60 seconds but it counting th

[Rails] Re: Database Interaction Encoding Problem

2008-09-11 Thread Aa Wilson
Frederick Cheung wrote: > On 11 Sep 2008, at 16:37, Aa Wilson wrote: > >> the gist of things: >> production environment (in which case, everything comes out exactly as >> compensate for whatever is giving this wonky output. As it is, we're >> pretty stumped. >> > > Could be what your terminal i

[Rails] Getting a list of models, AND custom model directory

2008-09-11 Thread Mozmonkey
I'm building an a client/web application that will rely on custom, simple plugins that will be written as models with single table inheritance to a Widget class. Ideally somebody would just need to create a simple model which extends the parent, placed in the correct directory and it work "just w

[Rails] Re: Beginner Question: Formatted Text Data -> Hash -> Database.

2008-09-11 Thread Pardee, Roy
I'll be interested to see what responses you get, but I can't think of a more efficient way. I'd try something like: my_file.each_line do |line| if line ~= /$User/ and this_user.username.length > 0 then if this_user.save then puts("Saved user #{this_user.username}") else p

[Rails] Using gmail smpt in production

2008-09-11 Thread blinking bear
I have an app that will be handling a lot of incoming e-mail. For dev purposes we've just been using gmail. This seems like a bad idea in production. Anyone using gmail in production that handles a fair amount of incoming email? thx --~--~-~--~~~---~--~~ You rec

[Rails] Beginner Question: Formatted Text Data -> Hash -> Database.

2008-09-11 Thread Jisho
I have a text document that has formatted data in it, and I am attempted to determine the best way to parse the data to break it up into hashes that I can then write to my databases. I suppose my issue is determining where to tell Ruby to STOP reading in data to write into the database. The file w

[Rails] time value won't come back from UTC

2008-09-11 Thread Stuart Corbishley
Hi there, I'm fairly new to RoR, and I seem to be having a problem with :time types. I save my times with a time_select on my form, to a time type field on MySQL. Rails automatically pulls it back to UTC from my timezone (+02:00), but when I display it again, it stays at the UTC value, i.e. I e

[Rails] Version of rails app

2008-09-11 Thread Kodak
Hi all, I want to ask about ideas of rails app versioning. I got app in development and want to know version that client is running. I can write some version string in application.html to show version... Other idea is to find the newest file (its date) in rails app directory - it can mark the "las

[Rails] Problem with set_table_name and custom method in model

2008-09-11 Thread Rémi Gagnon
Hi, When I try to run this command I got a table does not exist. >> Vehicule.get_vehicule(123,1123) class Vehicule < ActiveRecord::Base set_table_name "table_a" def self.get_vehicule( inte_no, poas_no) find_by_inte_no_and_poas_no( inte_no, poas_no) end end It looks like if you h

[Rails] Rails 2.1 Timezone Support

2008-09-11 Thread Nathan Esquenazi
I understand the basics of timezone support: http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/ Essentially, I just have to do this: # controllers/application.rb before_filter :set_time_zone def set_time_zone Time.zone = @current_user.time_zone if @current_user end That will s

[Rails] Session data is not saved in the session file although file created (using :p_store)

2008-09-11 Thread Gabriel
Hi all, I am new to Rails. I want to test some things with sessions. But I simply cannot make them work. I am using this in the environment.rb file: config.action_controller.session_store = :p_store config.action_controller.session = { :tmpdir => "#{RAILS_ROOT}/tmp/sessions/", :session_k

[Rails] Sending a file to a user

2008-09-11 Thread Michael Lavrisha
Hello, In my application I would like the user to download a file that is dynamically created from the database. Currently, I have rails put all the text into one variable and then save that to a temporary file with a filename that is generated from a sha1. If a user requests a file, is there a

[Rails] session/marshalling

2008-09-11 Thread Eleasar Werbitzky
I have the following problem with marshalling/saving a model to session. I have 4 models: User, Profile, Customer, Membership. Membership belongs to the other three models, and User, Profile and Customer all have a has_one :through => :memberhsip association to each other. Now I have a registratio

[Rails] Re: Relationship in a Volunteers Project

2008-09-11 Thread Daniel A.
Thanks for your help. I'll try it. On 9 sep, 02:44, DyingToLearn <[EMAIL PROTECTED]> wrote: > maybe try something like this for your routing > > map.connect 'month/:month_id/user/:user_id/shifts', :controller => > 'shifts', :action => 'index', :conditions => { :method=> :get } > map.connect 'mont

[Rails] Corrupted Pound (£) character with ActionMaile r

2008-09-11 Thread David North
When sending a plain text email with ActionMailer, the £ symbol is corrupted to "£". This doesn't happen in development, only production The charset in the email header is utf-8, I've also tried sending as ISO-8859-1 with no change Its an Ubuntu server using Sendmail. -- Posted via http://www

[Rails] Re: Rails Architecture,big app or multiple small app

2008-09-11 Thread Frederick Cheung
On 11 Sep 2008, at 16:52, Diego Bernardes wrote: > > Hi guys :) > > I have a question, i have a big program to code, its a issue > tracking + > time tracking + alot of others tracking that my client needs, the > question: > > - make a big rails application > - split the application into sm

[Rails] Re: Database Interaction Encoding Problem

2008-09-11 Thread Frederick Cheung
On 11 Sep 2008, at 16:37, Aa Wilson wrote: > > This is cross-posted to railsforum.com, so if you frequent both you > may > see it in both places. > > So, my co-worker and I are working on this project, a Rails app > using an > MS SQL database with lots of legacy stuff built in. He's stumble

[Rails] Re: (no subject)

2008-09-11 Thread Phillip Koebbe
Gilbert Gift Siima wrote: > I do not seem to understad what this error is about. Some body help. > > > wrong number of arguments (1 for 2) > RAILS_ROOT: C:/INSTAN~1/rails_apps/project/config/.. > > Application Trace | Framework Trace | Full Trace > #{RAILS_ROOT}/app/controllers/user_controller.

[Rails] Rails Architecture,big app or multiple small app

2008-09-11 Thread Diego Bernardes
Hi guys :) I have a question, i have a big program to code, its a issue tracking + time tracking + alot of others tracking that my client needs, the question: - make a big rails application - split the application into smaller applications with the same database - split the application

[Rails] use date_select to show only Saturdays?

2008-09-11 Thread Mike Whitman
I would like a form that only allows users to pick Saturdays. Anyway to do this with the date_select helper? Or any idea of an easy way to do this? Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Database Interaction Encoding Problem

2008-09-11 Thread Aa Wilson
This is cross-posted to railsforum.com, so if you frequent both you may see it in both places. So, my co-worker and I are working on this project, a Rails app using an MS SQL database with lots of legacy stuff built in. He's stumbled across a strange error, and we don't really know where to star

[Rails]

2008-09-11 Thread Gilbert Gift Siima
I do not seem to understad what this error is about. Some body help. wrong number of arguments (1 for 2) RAILS_ROOT: C:/INSTAN~1/rails_apps/project/config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/controllers/user_controller.rb:10:in `authenticate' #{RAILS_ROOT}/app/

[Rails] Re: HowTo search a string for content?

2008-09-11 Thread Jodi Showers
David - On 11-Sep-08, at 11:13 AM, Pardee, Roy wrote: > > Heh--there's actually a famous regexp (if you can imagine such a > thing) that faithfully tracks the RFA spec for e-mail addresses. > It's something like half a printed page long and would make a kick- > ass tattoo. > > I'm writing

[Rails] Re: Using the collect method to collect to a 2 dimensional a

2008-09-11 Thread Igor K.
Frederick Cheung wrote: > On Sep 11, 6:28�am, Sijo Kg <[EMAIL PROTECTED]> wrote: > >> end >> � � � � But this does not give array like above?Could you please tell me >> where is the fault?A group may have more than one manager and each >> manager has more than one email addresses of the above typ

[Rails] Re: HowTo search a string for content?

2008-09-11 Thread Pardee, Roy
Heh--there's actually a famous regexp (if you can imagine such a thing) that faithfully tracks the RFA spec for e-mail addresses. It's something like half a printed page long and would make a kick-ass tattoo. I'm writing from the bus, else I'd google up a link to it. But lots of much much sim

[Rails] How to turn an account page to pdf format?

2008-09-11 Thread Murray
In my site, I want to make some account page in pdf format. Is there a good way to turn html view into pdf view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send

[Rails] Login system not loading

2008-09-11 Thread Gig_gift
Hey guys I am new to ruby and programming in general. I tried to create a login system using ruby gems and got this message. Some body help. Here is the error message. NoMethodError in Account#signup Showing app/views/account/signup.rhtml where line #8 raised: undefined method `login' for # E

[Rails] Re: Roo gem installation fail

2008-09-11 Thread Roger Pack
Shaily Goel wrote: > hi > > I am tried to install roo gem 1.2.0 but it gives me following error. It > seems it require stdio.h which is not present. Can you please help me > how to install roo gem > > checking for stdio.h... no > *** extconf.rb failed *** > Could not create Makefile due to some

[Rails] Re: (Gem::RemoteFetcher::FetchError) can't get connected to the net!

2008-09-11 Thread Roger Pack
Some thoughts: Make sure you have the latest version of gems [1.2] If worst comes to worst I suppose you could download the gems by hand to your local machine then run gem install on them :) As a note, at least on my machine [OS X] that command works. -=R [1] http://www.akitaonrails.com/2008/

[Rails] Re: ActiveRecord - schema and relations between

2008-09-11 Thread Zirael
Thx, that plugin let me save lot of time. There is only problem with polymorphic relationship. On 10 Wrz, 09:22, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 10 Sep 2008, at 08:15, Zirael wrote: > > > > > You are right. But it is quite difficult(get a lot of time) to create > > these migra

[Rails] Re: respond_to and format

2008-09-11 Thread Konstantin
On 11 сент, 15:06, cheef <[EMAIL PROTECTED]> wrote: > wrong url? > check "myapp.com/foo.xml" No, no, the task was exactly reverse. I want to see normal html template (and not xml), but if I pass "format=xml" as a query parameter, Rails will try to display xml template (which doesn't exist) How to

[Rails] Re: Common models code - where to put it?

2008-09-11 Thread pepe
Thanks to all. :) Pepe On Sep 11, 9:16 am, Ryan Bigg <[EMAIL PROTECTED]> wrote: > You could define the model like this, as a file called lib/ > shared_methods.rb > > module SharedMethods >    def to_s >      name >    end > end > > and then just type include SharedMethods in any model you want t

[Rails] Re: Enconding decoding? what to do

2008-09-11 Thread Frederick Cheung
On 11 Sep 2008, at 14:02, David Liwoch wrote: > > I have this output: > Using <%= string%> or <%=h string%> > > Velkommen+til+Personalebasen%2E%0D%0A%0D%0ADu+har+f%E5et+tildelt+et > +brugerID%3A+4531711982... > > And this output: > Using <%=u string%> > Velkommen%2Btil%2BPersonalebasen%252E%250D

[Rails] inheritance fail.

2008-09-11 Thread flamingflamingo
Hi guys, I'm building a class that handles functions for both IE and FF. The trubble is that when I pass a class (e.g. for IE), I can't use normal functionality. A wee example below. the browser.goto("http://www.nu.nl";) command fails. class BIE http://www.nu.nl";) --~--~-~--~~--

[Rails] Re: namespaced layouts?

2008-09-11 Thread Ryan Bigg
The application layout is for the entire application and it doesn't care about what namespace you're in. If you really wanted a different layout you could use the layout method in your controller to tell it which one you want. - Ryan Bigg Freelancer Skype: radarlistener MSN & Gtalk: [EMA

[Rails] Re: Common models code - where to put it?

2008-09-11 Thread Ryan Bigg
You could define the model like this, as a file called lib/ shared_methods.rb module SharedMethods def to_s name end end and then just type include SharedMethods in any model you want to have that to_s method. - Ryan Bigg Freelancer Skype: radarlistener MSN & Gtalk: [EMAIL PRO

[Rails] Re: specify length / decimal places in a migration?

2008-09-11 Thread Bill Walton
Hi Jorge, Pozole wrote: > You should use decimal instead of float. > > t.column :name, :decimal, :precision => 10, :scale => 2 Perfect. Thanks much! Best regards, Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[Rails] Enconding decoding? what to do

2008-09-11 Thread David Liwoch
I have this output: Using <%= string%> or <%=h string%> Velkommen+til+Personalebasen%2E%0D%0A%0D%0ADu+har+f%E5et+tildelt+et +brugerID%3A+4531711982... And this output: Using <%=u string%> Velkommen%2Btil%2BPersonalebasen%252E%250D%250A%250D%250ADu%2Bhar%2Bf %25E5et%2Btild... Its an output from

[Rails] Re: Rails 1.2.6 errors on Oracle 8i DB

2008-09-11 Thread Michele Costa
I've solved my problem. It seems that our old friend Oracle 8 does not support ANSI SQL for the join statements. Also if u open the oracle_adapter.rb file of ActiveRecord library, it says: # Support for Oracle8 is limited by Rails' use of ANSI join syntax, which # is supported in Oracle9i

[Rails] Re: namespaced layouts?

2008-09-11 Thread Ray
My guess is that layouts span across controllers and views...aka namespaces. I have one layout for my entire app mostly. And where I have another layout is for public pages, but these layout are in no way controller specific. Thou I do see apps where this makes sense. Ray On Sep 10, 1:10 pm, Dan

[Rails] adding items in sent items page

2008-09-11 Thread Adolf Charles
am in the process of developing a small application in which i want mails to be sent out whenever a customer purchases a product.mails can now be sent but i cannot see them in my sent items page at the moment. this is my method in the controler, def sent_items

[Rails] Re: Common models code - where to put it?

2008-09-11 Thread tinytiger
Actually I think the module will be automatically included if you put it in the "lib" folder. You dont have to "require" it. mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post

[Rails] Re: Routing problem in Rails 2.x

2008-09-11 Thread nas
simply changing this form_for(:activity, :url => activities_path(@workout)) to form_for(:activity, :url => workouts_activities_path(@workout)) should work On Sep 9, 12:23 pm, CountBrass <[EMAIL PROTECTED]> wrote: > Hi > > I get this error: > > Showing workouts/show.html.erb where line #14 rai

[Rails] Re: help - mongrel not running on windows, MissingSourceFile

2008-09-11 Thread nas
the easiest thing to do is to fool it by changing the name of your folder C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60 to C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32 and it should work as usual On Sep 8, 7:22 pm, Brian <[EMAIL PROTECTED]> wrote: > I'm relatively new t

[Rails] Re: custom field name for error messages?

2008-09-11 Thread nas
you can add something like this below your field to achieve this <%= error_message_on :user, :active, "Status ", ' ', ' ' %> On Sep 10, 2:26 am, Tim <[EMAIL PROTECTED]> wrote: > I know this may be nit-picky, but I'd like to show a more friendly > field name when displaying error messages. > > F

[Rails] Re: update_attributes not updating

2008-09-11 Thread Fernando Perez
Argh! I'm so stupid! I was updating a field and displaying another one which remains constant. Everything is working fine... except me :-D -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Rails] Re: respond_to and format

2008-09-11 Thread cheef
wrong url? check "myapp.com/foo.xml" On 11 сент, 14:50, Konstantin <[EMAIL PROTECTED]> wrote: > Hello! > > I use a "format" parameter in my application for internal calculations. > But Rails catches it and uses for view name. > I mean, if I go to url: > myapp.com/foo/?format=xml > Rails tries to

[Rails] Re: Can't I call a private method from a self.method

2008-09-11 Thread Jay Pangmi
Frederick Cheung wrote: > Like I said you can't call an instance method without an instance. > It's like trying to say ActiveRecord::Base.reload - it doesn't make > any sense - you can only call that on an instance. > > Fred Ok, so would it be like: self.method() or obj=MailSending.new() and the

[Rails] respond_to and format

2008-09-11 Thread Konstantin
Hello! I use a "format" parameter in my application for internal calculations. But Rails catches it and uses for view name. I mean, if I go to url: myapp.com/foo/?format=xml Rails tries to show me index.xml.erb view, but I don't want this! I want the application to continue showing index.html.e

[Rails] Re: update_attributes not updating

2008-09-11 Thread Ryan Bigg
Got attr_protected on one of your model attributes? On 11/09/2008, at 20:05, Fernando Perez <[EMAIL PROTECTED] > wrote: > > I have a similar problem here. > > The SQL generated is perfect, but one of my models refuses to get > updated. > > -- > Posted via http://www.ruby-forum.com/. > > >

[Rails] Re: update_attributes not updating

2008-09-11 Thread Fernando Perez
I have a similar problem here. The SQL generated is perfect, but one of my models refuses to get updated. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] [ANN/ADV] RubyConf 2008 registration now open!

2008-09-11 Thread David A. Black
Hi everybody -- I'm happy to report that registration is now open for RubyConf 2008, produced by Ruby Central, Inc., and to be held November 6-8 in Orlando, Florida. The program is posted and looks amazing. We've got * keynote and Q&A with Matz * an evening talk by Dave Thomas * entire

[Rails] Re: Can't I call a private method from a self.method

2008-09-11 Thread Frederick Cheung
On 11 Sep 2008, at 09:56, Sijo Kg wrote: > > Hi > Thanks for the reply..I can call the first like > MailSendingProblem.send_mail_to_all_contacts(@problem) upto that it > is > Ok But it does not call the private method So need I to make the above > private method public or any other solution

[Rails] Re: ultrasphinx and has_many_polymorphs

2008-09-11 Thread Benjamin Bonnet
I had read this one, http://rubyforge.org/forum/forum.php?thread_id=18082&forum_id=14244; steroids seems to work well… I found some clues here : /usr/lib/ruby/gems/1.8/gems/has_many_polymorphs-2.12/test/integration/app/config/ultrasphinx/development.conf.canonical wich show the output : SELEC

[Rails] Re: Can't I call a private method from a self.method

2008-09-11 Thread Sijo Kg
Hi Thanks for the reply..I can call the first like MailSendingProblem.send_mail_to_all_contacts(@problem) upto that it is Ok But it does not call the private method So need I to make the above private method public or any other solution? Sijo -- Posted via http://www.ruby-forum.com/. --~-

[Rails] Re: find :all and RAM memory

2008-09-11 Thread Frederick Cheung
On Sep 11, 9:35 am, Abel <[EMAIL PROTECTED]> wrote: > Say you have a table with a very high number or entries and you > perform a search that would bring out a lot of results like this: > > a = Ad.find :all > > My question is how is this stored in memory? can this crash your > server or freeze i

[Rails] Re: ultrasphinx and has_many_polymorphs

2008-09-11 Thread Thorsten Müller
It seems, UltraSphinx has some minor trouble getting the SQL for more complex queries right. I've used it like this: is_indexed :fields => [:name, :description, :updated_at, :created_at, :orders_count, :views, :low_res, :category_id], :concatenate => [{:association_name => "tags",

[Rails] Re: Can't I call a private method from a self.method

2008-09-11 Thread Frederick Cheung
On Sep 11, 9:34 am, Sijo Kg <[EMAIL PROTECTED]> wrote: > Hi >    I have in MailSending class > def self.send_mail_to_all_contacts(problem) >   description=split_name_and_email_array(joined_array,problem) > end > > private >   def split_name_and_email_array(name_email_array,pb) >   code.. >  

[Rails] find :all and RAM memory

2008-09-11 Thread Abel
Say you have a table with a very high number or entries and you perform a search that would bring out a lot of results like this: a = Ad.find :all My question is how is this stored in memory? can this crash your server or freeze it or is it safe to use in production? --~--~-~--~~

[Rails] Can't I call a private method from a self.method

2008-09-11 Thread Sijo Kg
Hi I have in MailSending class def self.send_mail_to_all_contacts(problem) description=split_name_and_email_array(joined_array,problem) end private def split_name_and_email_array(name_email_array,pb) code.. split_value="somevaluehere" end But here I get error as undefined metho

[Rails] Strange attachment_fu problem: thumbnails limited to 1

2008-09-11 Thread jawosis
Hi, I am encountering a strange issue with attachment_du: whatever classes of thumbnails I define, only one is recognized and accordingly processed when creating a new image. For example: :thumbnails => {:thumb => "65x65", :big => "548x548"} just produces a "big" thumbnail and the "thumb" thumbn

[Rails] Re: Using the collect method to collect to a 2 dimensional a

2008-09-11 Thread Frederick Cheung
On Sep 11, 6:28 am, Sijo Kg <[EMAIL PROTECTED]> wrote: > And now in Group class > def self.get_managers_name_and_emails(grp_id) >     managers=Group.find_by_id(grp_id).contacts.find(:all,:conditions => > ['group_user_type_id = ?',4]) >     managers.each do |manager| >       manager.contact_emai

[Rails] Re: cached_models

2008-09-11 Thread Conrad Taylor
On Thu, Sep 11, 2008 at 12:47 AM, Luca Guidi <[EMAIL PROTECTED]> wrote: > > Hi all, > Yesterday I released a new Rails plugin: cached_models. > It allows to transparently use the internal Rails cache mechanism in > your models, avoiding to write code for expiring policies. > > Example > > class Pr

[Rails] cached_models

2008-09-11 Thread Luca Guidi
Hi all, Yesterday I released a new Rails plugin: cached_models. It allows to transparently use the internal Rails cache mechanism in your models, avoiding to write code for expiring policies. Example class Project < ActiveRecord::Base has_many :developers, :cached => true end class Developer

[Rails] Re: HowTo search a string for content?

2008-09-11 Thread David Liwoch
Hehe.. definetly a more simple way to do exactly that. Thank you Guess Reg Exp can probably define a more accurate pattern for email validation. Thx On Sep 10, 2:23 pm, "Pardee, Roy" <[EMAIL PROTECTED]> wrote: > the others are right to point you to regular expressions--definitely worth > learn

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-11 Thread MalHayn
Hi All, No solution... I removed and reinstalled Firefox 3.0.1 and the problem was still there: under Rails the embedded objects were reduced in size to approximately 91% of the original size. For example, an object embedded at 400x400 reduced to 366x366, 600x600 reduced to 548x548, 200x200 redu

[Rails] utf 8 or something else ?

2008-09-11 Thread UE RP
Hello! If i perform the search with Cyrillic letters i'm getting this params. ~~ --- !map:HashWithIndifferentAccess search: !binary | 0YHQsNGa0LTRgdGZ0Zo=? authenticity_token: ada7888510dacc744af93f6a5f3d058d942a5522 action: search method: post controller: jobs else is ok. Everythi

[Rails] mod_fcgid: couldn't bind unix domain socket

2008-09-11 Thread Gambito
hi! i'm having the following problem installing fast-cgi to use ruby on rails [Wed Sep 10 16:48:35 2008] [error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /tmp/fcgid_sock/6389.14 is a very strange error, because i've got all permissions on /tmp/ fcgid_sock, so it

[Rails] Re: How to get fleximage plugin work on edge?

2008-09-11 Thread [EMAIL PROTECTED]
I've also experienced this problem, I need to use new functionality in edge rails and this has broken my FlexImage setup. I did try just creating an empty 'compile' method but unfortunately this created more problems. Anyone had any joy yet? RobL Erik Dahlstrand wrote: > Hi all! > > I have deve

[Rails] (Gem::RemoteFetcher::FetchError) can't get connected to the net!

2008-09-11 Thread Nathan Haskins
Hello everyone, I recently picked up the Agile web dev with Rail book and followed the installation instructions for Windows using InstantRails... well it works up until the point i try to.. 'gem update rails --include-dependencies' . i end up with the following error message: pdating i

[Rails] Re: How does the sub-domain like urls are created in web apps?

2008-09-11 Thread Christian Lescuyer
You can use subdomains for various purposes. One is to host different servers (eg mail.example.com and www.example.com), or to host different applications (eg [EMAIL PROTECTED] and [EMAIL PROTECTED]). I believe Basecamp use it to have nicer URLs. The standard way would be: //www.example.com/~rock

  1   2   >