[Rails] Re: Get cookie valuu into the model

2009-10-09 Thread GG9 Rails
The reason i want to do that is because ia'm writing a program using Paperclip in combination that can upload your picture in different sizes. For now i have this >def self.last_avatar >Avatar.find(:last) > end > > def self.new_avatar_size > last_avatar.avatar_size > rescue >

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread saideep a.v.s
We use Pivotaltracker.com and it is good . I recommend that one . Best Wishes, Saideep Annadatha On Sat, Oct 10, 2009 at 9:58 AM, Marnen Laibow-Koser < rails-mailing-l...@andreas-s.net> wrote: > > Marnen Laibow-Koser wrote: > > Hassan Schroeder wrote: > >> On Fri, Oct 9, 2009 at 1:12 AM, CNNN

[Rails] Re: Updating multiple tables with one form

2009-10-09 Thread ryan8720
Thanks for all the help so far. I believe I'm starting to understand things now. The part above is working great. However, I have a controller called calculator which is the only part that will be accessible to users. From calculator you enter information about the house, then that information

[Rails] Javascript template, extension naming ?

2009-10-09 Thread Teedub
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. Thanks in advance. --~--~-~--~~~---~--~~ You received

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: > 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. > > I'll check that ou

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Philip Hallstrom
Since everyone is sharing... I've been using Billings (mac only) for about a year. Menu icon for starting/stopping/switching timers. Pretty invoices. Tracks payments/checks, etc. Is *NOT* enough by itself to do all your books though. Has a nice feature where if you are running a timer a

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread heimdull
I'm using http://www.getharvest.com/ for time keeping and invoicing.. I also has a great iPhone app that you can use to keep your time or check your records on the go... On Oct 9, 1:12 am, CNNN NICK wrote: > Hi, > > Was wondering what are the tools that freelance developers are using to > track

[Rails] Re: Maintaining non persisted data

2009-10-09 Thread Marnen Laibow-Koser
Cris Shupp wrote: > I tried with statics (They're just called "class variables" in Ruby.) > and that did not work. It is as if rails > completely unloads the controller between invocations. In development mode, it does. And in production, there's no guarantee that you'll get the same serve

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread David Chua
I use http://slimtimer.com to track my time working on a project, but I'm starting to feel its not the optimal way to go ahead. David On Sat, Oct 10, 2009 at 6:48 AM, Marnen Laibow-Koser < rails-mailing-l...@andreas-s.net> wrote: > > Hassan Schroeder wrote: > > On Fri, Oct 9, 2009 at 1:12 AM, CN

[Rails] Re: Maintaining non persisted data

2009-10-09 Thread Cris Shupp
I tried with statics and that did not work. It is as if rails completely unloads the controller between invocations. class TransientController < ApplicationController def initialize puts 'initialize called' end def gather puts 'gather' respond_to do |format| format.ht

[Rails] Maintaining non persisted data

2009-10-09 Thread Cris Shupp
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 called every time gather and show

[Rails] Re: protect_from_forgery development mode

2009-10-09 Thread Rick
It's working with Ruby1.9.1p243/Rails2.3.4. Check config/environments/development.rb and make sure you don't have "config.action_controller.allow_forgery_protection = false" in there. Add protect_from_forgery to ApplicationController and you should see a http://groups.google.com/group/rubyonrails

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Marnen Laibow-Koser
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. I'll check that out. I've been using Redmine and an app c

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Hassan Schroeder
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. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan --~

[Rails] Problems with Redbox

2009-10-09 Thread RVince
I am using the Redbox plugin to display a form. However, in that form I've noticed that one of the fields, which uses the auto-complete plugin, doesn;t work. The same code, if I take it out of the div that redbox is displaying, works fine. Similarly, I have a select box, wherein the selected valu

[Rails] Re: XML into database

2009-10-09 Thread Walter McGinnis
We do this in the Kete app (http://github.com/kete/kete). Look in lib/ extended_fields.rb for example code. In hindsight, I would probably have been better off to have done this with either marshalling or YAML rather than storing XML though. Cheers, Walter On Oct 9, 2009, at 10:35 PM, jhaag

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

2009-10-09 Thread jko170
The plugin is this: http://livevalidation.rubyforge.org/ On Oct 9, 2:53 pm, Marnen Laibow-Koser wrote: > Philip Hallstrom wrote: > >> How do you guys feel about client side validation? Do you think its > >> necessary or a waste of time? > > > All depends on the app for me.  You obviously have to

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

2009-10-09 Thread Marnen Laibow-Koser
Philip Hallstrom wrote: >> How do you guys feel about client side validation? Do you think its >> necessary or a waste of time? > > All depends on the app for me. You obviously have to validate server > side regardless, but if there are things you can do client side to > make it easier for the u

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

2009-10-09 Thread Philip Hallstrom
> How do you guys feel about client side validation? Do you think its > necessary or a waste of time? All depends on the app for me. You obviously have to validate server side regardless, but if there are things you can do client side to make it easier for the user, go for it. I'm thinking

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

2009-10-09 Thread Marnen Laibow-Koser
jko170 wrote: > How do you guys feel about client side validation? Do you think its > necessary or a waste of time? Good: gives user immediate feedback without the overhead of a server request. Waste of time: Only works if JS is on. Not airtight, and may cause problems for browsers that don't

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

2009-10-09 Thread jko170
How do you guys feel about client side validation? Do you think its necessary or a waste of time? --~--~-~--~~~---~--~~ 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 rubyo

[Rails] Re: Scaling database. The easiest one!?

2009-10-09 Thread Philip Hallstrom
>> Another question, about full text search, its better stick with the >> one >> inside de database or something external like Sphinx!? Im worring >> about >> speed and easy of use. > > My vote goes for Sphinx. MySQL full text search limits you to MyISAM > tables and is only suitable if you ne

[Rails] Re: autocomplete with extra data

2009-10-09 Thread Chris Habgood
Ok here is the full code then. <%= text_field_with_auto_complete :friend, :name,{:select => "NAME"}, :after_update_element => "function(element,value){" + remote_function(:url => { :controller => 'followerranking', :action => :ajax_add_friend }, :with => "'friend[name]=' + element.value") + "}" %>

[Rails] Re: autocomplete with extra data

2009-10-09 Thread mike
Wtf is this about? 2009/10/9, Me : > > I have the autocompleter using the :select => 'NAME' option. > > This is the partial: > > > <% @dt.each do |user| -%> > > <%=h user[0] %> > > <%= user[0] %> > > > <%= user[1] %> > > > <% end %> > > > I am getting all of the data when I select the nam

[Rails] Re: Upgrade to Snow Leopard gives me closed stream in rails 2.3.4

2009-10-09 Thread MartOn
There is not a specific query that fails. I know I do not have to wipe out gems. But sine I did, all gems ARE recompiled when I test. I also know that Snow has its built in ruby 1.8.7. Thats what I am trying to explain here. When I use the ruby 1.8.7 that comes with Snow, then I get this strange

[Rails] Re: Get cookie valuu into the model

2009-10-09 Thread Jacob Helwig
On Fri, Oct 9, 2009 at 12:36, GG9 Rails wrote: > > How can i get the value of a cookie into the model. > > (cookies[:mycookie]) > > In the model i get a undefined method. > I understand this is not supported by Activereccord::base > > But how can i get this values evan as remote_ip and other valu

[Rails] Get cookie valuu into the model

2009-10-09 Thread GG9 Rails
How can i get the value of a cookie into the model. (cookies[:mycookie]) In the model i get a undefined method. I understand this is not supported by Activereccord::base But how can i get this values evan as remote_ip and other values. For my rails app i need some important values but in the mo

[Rails] Need help with ecommerce

2009-10-09 Thread Ryan Siddle
Hi everyone, I've been heavily modifying the Substruct ecommerce application to bring it upto date with Authlogic and a lot of new functionality. I would like to make it open source and upload it to Git, however I need help testing the application and finding any further bugs. Would anyone here

[Rails] Re: rails: command not found on Debian lenny

2009-10-09 Thread kitty00
Thanks you! I found rails and did alias and export path. I ended up installing activesupport too. Now it is working! Finally! Thanks a bunch to everyone! On Oct 9, 2:41 am, Leonardo Mateo wrote: > On Thu, Oct 8, 2009 at 9:44 PM,kitty00 wrote: > > > How do I create symlink for rails? > > I cou

[Rails] Re: Eager Loading a Relationship That Has No PK/FK

2009-10-09 Thread Aldric Giacomoni
MaggotChild wrote: > > Modifying the DB isn't possible but ... Okay. Make a new database, import the data into it (don't forget to add the railsy primary keys), and MAGIC. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messa

[Rails] Re: validates_format_of .csv

2009-10-09 Thread John Mcleod
mike wrote: > I think you try to parse the csv before saving the model to the db. > Thats when validations would be run. You should catch any FasterCSV > Exceptions and give a proper error message in the controller. > > 2009/10/8, John Mcleod : >> Below is my model. >> Thank you. >> >> JohnM >> -

[Rails] Re: Best approach when data store is XML instead of a databa

2009-10-09 Thread Marnen Laibow-Koser
Brian Hartin wrote: > Hi all, > > Does anyone know of an approach/plugin that for model classes persisted > to XML, as ActiveRecord works with databases? I'm aware of > ActiveRecord::XMLSerialization, but I'd like to expand on that in two > ways: [...] > We're trying to avoid the ORM quagmire.

[Rails] Re: A table based grid - please let me know if I'm reinventi

2009-10-09 Thread Marnen Laibow-Koser
C K Kashyap wrote: > Hi Folks, > Since I did not find an editable grid that suits my requirement (of > being light weight and editable) I started writing > my own - here's what I'm trying - > > > A helper function like this that renders a grid - [...] I would suggest that you might want to put

[Rails] Re: Eager Loading a Relationship That Has No PK/FK

2009-10-09 Thread MaggotChild
On Oct 9, 10:24 am, Marnen Laibow-Koser wrote: > MaggotChild wrote: > > I'm attempting to wrestle an old DB into Rails. > > This relationship is giving me trouble: > > > class Show < AR::Base > >   has_many :segments > > end > > > class Segment < AR::Base > >   belongs_to :show > >   has_one :m

[Rails] Best approach when data store is XML instead of a database?

2009-10-09 Thread Brian Hartin
Hi all, Does anyone know of an approach/plugin that for model classes persisted to XML, as ActiveRecord works with databases? I'm aware of ActiveRecord::XMLSerialization, but I'd like to expand on that in two ways: 1) The 'to_xml' method currently serializes descendant objects only when explici

[Rails] Re: Eager Loading a Relationship That Has No PK/FK

2009-10-09 Thread MaggotChild
On Oct 8, 4:25 pm, Frederick Cheung wrote: > On Oct 9, 12:01 am, MaggotChild wrote: > > A Segment is "linked" to Media by Media.name, which is the result of > > concatenating Segment.name and Segment.part. As I said there are is no > > PK/PK relation so the actual Segment class looks like this:

[Rails] Re: Return "title" column if "caption" column is empty?

2009-10-09 Thread Marnen Laibow-Koser
mike wrote: > Afaik it has nothing to do with method missing magic. Its just that if > you overwrite a method, a call to super invokes the original method. Not really. As far as I know, super calls the method of the same name *in the parent class*, which isn't always the same thing. That's why

[Rails] Re: Return "title" column if "caption" column is empty?

2009-10-09 Thread mike
Afaik it has nothing to do with method missing magic. Its just that if you overwrite a method, a call to super invokes the original method. AR injects accessor methods for every table column into the class. 2009/10/8, Marnen Laibow-Koser : > > Mauricio Szabo wrote: >> Have you tested it? I tried

[Rails] Re: Eager Loading a Relationship That Has No PK/FK

2009-10-09 Thread Marnen Laibow-Koser
MaggotChild wrote: > I'm attempting to wrestle an old DB into Rails. > This relationship is giving me trouble: > > class Show < AR::Base > has_many :segments > end > > class Segment < AR::Base > belongs_to :show > has_one :media #this has no PK/FK relation > end > > A Segment is "linked"

[Rails] Re: validates_format_of .csv

2009-10-09 Thread Matt Jones
+1 on Mike's suggestion - otherwise, you'll get users RENAMING their .doc file to end with .csv and uploading it over and over... :) --Matt Jones On Oct 8, 11:47 am, John Mcleod wrote: > Hello all, > I'm trying to validate a uploaded file extension.  I'm not using any > special plugin other tha

[Rails] Re: How to protect against DoS?

2009-10-09 Thread sax
If it is a problem with your db server reaching its limit, you may be able to optimize your queries to reduce the number required for each request. On Oct 9, 9:22 am, heimdull wrote: > If the system slows down because of the amount of users you will need > more horsepower or limit the amount of

[Rails] Re: Eager Loading a Relationship That Has No PK/FK

2009-10-09 Thread Matt Jones
BTW, if the "old DB" in question is going away after you complete the new one, I'd suggest that you'd be better off migrating the data to a more Railsish structure all at once (essentially an import process) and then forget about the hinky structure of the old DB. I've worked with several absolute

[Rails] Re: Definitive guide to Rake commands

2009-10-09 Thread Marnen Laibow-Koser
Rob Nichols wrote: > Thank you again Conrad. > > I have answered the question that started me down this path. That was, > is there a simpler form of rake db:migrate that I could use to migrate > non-development databases. Rake db:migrate, like most railsy things, looks at the RAILS_ENV enviro

[Rails] Re: How to protect against DoS?

2009-10-09 Thread heimdull
If the system slows down because of the amount of users you will need more horsepower or limit the amount of concurrent users that use the system. In apache you can set the MaxClients setting if you are using a worker MPM. But you need to find where the bottleneck is so that you can fix it. I lik

[Rails] Re: How to protect against DoS?

2009-10-09 Thread sax
There's a great screencast series named "Scaling Rails" that may give you ideas. But yeah, as the previous poster implies, your problem could be anywhere. You may want to try to identify where the main bottleneck is in your application (whether it's the rails server or the db server) and how you

[Rails] Re: Error on relations

2009-10-09 Thread Ilan Berci
Marnen Laibow-Koser wrote: > > "Best practices" suggest no such thing that I'm aware of. In a typical > app, most models will have associated controllers. Some controllers > will not have associated models, and a few models may not have > associated controllers. There's no reason to slavis

[Rails] Re: Adding columns to DB on the fly

2009-10-09 Thread Marnen Laibow-Koser
kerdany wrote: > Hi, > I'm doing a multilanguage application which kind-of abuses the concept > of dynamic models of Rails. > > I allow the application administrator to create a new language (theres > a Language model), and each time a new language is created, I > automatically add a new column t

[Rails] Re: Error on relations

2009-10-09 Thread Marnen Laibow-Koser
Ilan Berci wrote: > Pål Bergström wrote: >> I have a controller and model for both "products" and "baskets". I've >> set up the belongs_to and has_many. When I'm in a third controller >> "shop" I get an error when I try to get the "products" data via >> "baskets". So asking for item.product.price

[Rails] Re: Error on relations

2009-10-09 Thread Pål Bergström
Ilan Berci wrote: > Pål Bergström wrote: > > that's because you defined baskets as having MANY products.. therefore > it's: > > item.products.each do |product| > # more code to deal with each product > end > > hth > > ilan thanks :-) -- Posted via http://www.ruby-forum.com/. --~--~--

[Rails] Re: Error on relations

2009-10-09 Thread Ilan Berci
Pål Bergström wrote: > > I get @mybasket. But I can't access product info. It says "undefined > method `product'" that's because you defined baskets as having MANY products.. therefore it's: item.products.each do |product| # more code to deal with each product end hth ilan -- Posted vi

[Rails] ActiveRecord::Errors#full_messages changes in 2.3.4

2009-10-09 Thread Jeroen
After upgrading our application from Rails 2.3.2 to 2.3.4 all our error messages appeared as "{{attribute}} {{message}}" (literally). Since we noticed this problem short before a release and hadn't enough time to look deeper into it we fixed it by using the "old" full_messages method that was pre

[Rails] Re: Reports libraries with Rails?

2009-10-09 Thread Mengu
hi, i have no idea on this for C-Ruby but if you are willing to use jRuby, then there is Jesper Reports. check it. your sincerely mengu On Oct 9, 3:48 pm, Maurício Szabo wrote: > Hey,  folks. > > Is there any good library to generate reports on ruby on rails (like Crystal > Reports, for exampl

[Rails] protect_from_forgery development mode

2009-10-09 Thread John van Dijk
Should this be working in development mode? For some reason it doesn't. regards, John --~--~-~--~~~---~--~~ 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-tal

[Rails] Re: YANQ (Yet Another Newbie Question): Ordered entries in a database

2009-10-09 Thread Rob Biedenharn
On Oct 9, 2009, at 9:31 AM, Patrick Doyle wrote: > On Fri, Oct 9, 2009 at 9:01 AM, Billee D. > wrote: >>> Is there a non-standard way to do this specific to Sqlite3, MySQL, >>> etc... ? >> >> You can use a view: >> >> http://dev.mysql.com/doc/refman/5.0/en/create-view.html >> > From what I've

[Rails] Re: Error on relations

2009-10-09 Thread Pål Bergström
Ilan Berci wrote: > Pål Bergström wrote: > Controllers have nothing to do with models, although best practices > suggests having a controller per model. > > A controller has visibility into all your models if it needs to.. > > Please show us your relations that you wrote in your models and the

[Rails] Re: How to protect against DoS?

2009-10-09 Thread Ilan Berci
Maurício Szabo wrote: > > How to protect against these cases? > > Thanks in advance, > Mauricio Advise administration that they will need to cut down on the number of students they enroll each year. It that doesn't appeal to you, then please resubmit your post with a little more information

[Rails] Re: Error on relations

2009-10-09 Thread Ilan Berci
Pål Bergström wrote: > I have a controller and model for both "products" and "baskets". I've > set up the belongs_to and has_many. When I'm in a third controller > "shop" I get an error when I try to get the "products" data via > "baskets". So asking for item.product.price gives an error. > > Can

[Rails] Error on relations

2009-10-09 Thread Pål Bergström
I have a controller and model for both "products" and "baskets". I've set up the belongs_to and has_many. When I'm in a third controller "shop" I get an error when I try to get the "products" data via "baskets". So asking for item.product.price gives an error. Can I have this kind of relation whe

[Rails] Re: Rails errors and background processes

2009-10-09 Thread Gregory Mazurek
On Fri, Oct 9, 2009 at 7:19 AM, Hans wrote: > > I have a rails application running as a background process using > plugin spawn. It works fine, but I do not get any error messages if > something goes wrong > Anyone knows how to cath error mssages in a background process? > > Any help would be ver

[Rails] Adding columns to DB on the fly

2009-10-09 Thread kerdany
Hi, I'm doing a multilanguage application which kind-of abuses the concept of dynamic models of Rails. I allow the application administrator to create a new language (theres a Language model), and each time a new language is created, I automatically add a new column that corresponds to an existin

[Rails] Re: Problem with oracle_enhanced adapter

2009-10-09 Thread Rafael Roque
anybody? -- 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 f

[Rails] Re: YANQ (Yet Another Newbie Question): Ordered entries in a database

2009-10-09 Thread Patrick Doyle
On Fri, Oct 9, 2009 at 9:01 AM, Billee D. wrote: >> Is there a non-standard way to do this specific to Sqlite3, MySQL, etc... ? > > You can use a view: > > http://dev.mysql.com/doc/refman/5.0/en/create-view.html > >From what I've read, using #default_scope and adding an index to my db seem to be

[Rails] Re: get value of select whch change using ajax after form submit

2009-10-09 Thread Salil Gaikwad
Hi All, Sorry for this but it's not working properly because i use form_for tag inside the tag. i only remove form from inside the table and keep outside the table tag and now everything is works like a magic. I hope this will help someone to save his/her 1 hr or 2. Regards, Salil Gaikwad

[Rails] Re: YANQ (Yet Another Newbie Question): Ordered entries in a database

2009-10-09 Thread Billee D.
> Is there a non-standard way to do this specific to Sqlite3, MySQL, etc... ? You can use a view: http://dev.mysql.com/doc/refman/5.0/en/create-view.html This is supported with slightly varying syntax by Oracle, MSSQL, MySQL, and PostgreSQL. I can't remember if AR support for views has been add

[Rails] Reports libraries with Rails?

2009-10-09 Thread Maurício Szabo
Hey, folks. Is there any good library to generate reports on ruby on rails (like Crystal Reports, for example)? I'm working on a system, and I need for my reports: 1) Generate HTML Reports 2) Generate CSV Reports 3) Generate Excel / OpenOffice Spreadsheets Reports 4) Generate XML Reports (REST-l

[Rails] Re: Scaling database. The easiest one!?

2009-10-09 Thread Rimantas Liubertas
> - Im using OLAP, dont have alot of data today, but its growing, and is > very intensive query, everyone say that postgresql is better on complex > queries. Generalizations like these do not make any sense because of lots and lots of variables involved: data set structure, size, query type, sche

[Rails] Re: Heavy reports with a lot of calculations

2009-10-09 Thread SeanWalberg
Hello, On Oct 8, 9:58 pm, Goin Tan wrote: > Tables are big and there are a lot of calculation with several big tables. > Please give me some suggestions whether there any gem, plugin, articles, or > techniques that allows me to create heavy reports. I've been using Ruby Reports (http://rubyrep

[Rails] Re: Variable sizes with paperclip

2009-10-09 Thread GG9 Rails
I found a more simple solotion now def self.last_avatar Avatar.find(:last) end def self.new_avatar_size last_avatar.avatar_size rescue "48x48" end has_attached_file :avatar, :styles => { :small => new_avatar_size, :large => "500x500>" }, The only problem left

[Rails] How to protect against DoS?

2009-10-09 Thread Maurício Szabo
Hello, folks. We have a system that is used by all students on the university. Problem is, when the system is overloaded, people keep strinking F5, and eventually things become too slow to be usable (sometimes, even passenger dies). How to protect against these cases? Thanks in advance, Mauricio

[Rails] get value of select whch change using ajax after form submit

2009-10-09 Thread Salil Gaikwad
Hi All, I have a problem while updating select list using ajax and then submit it. what i have done is to change the drop down of a city when i changed the state.but when i am submitting the form i am not able to get the value of city. Following is my code for the same. edit.html.erb <% form_for

[Rails] Re: Return "title" column if "caption" column is empty?

2009-10-09 Thread Tony
@Joshua - FYI self[:caption] <=> read_attribute(:caption) @Chris - ...and I am guessing interchangeable with self.caption On Oct 9, 5:27 am, Chris wrote: > def caption >   self[:caption] || title > end > > On Oct 8, 5:11 am, Joshua Muheim > wrote: > > > Hi all > > > Oh my god, this really shou

[Rails] Rails errors and background processes

2009-10-09 Thread Hans
I have a rails application running as a background process using plugin spawn. It works fine, but I do not get any error messages if something goes wrong Anyone knows how to cath error mssages in a background process? Any help would be very much appreciated --~--~-~--~~~--

[Rails] Re: Using AJAX to generate complex forms interactively - any guides?

2009-10-09 Thread Patrick Doyle
On Fri, Oct 9, 2009 at 12:34 AM, Sijo kg wrote: > >> "if �...@sub_categories == nil". > > Hi >   Check @sub_categories.blank? > I'm pretty sure that #blank? is supposed to be used to check if a parameter is present or, if present, is blank. I think the method you're looking for here is #empty?

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

2009-10-09 Thread Mat Harvard
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, and also if I should Base64 encode the result of

[Rails] Tell ActionMailer to use a specific IP address to send

2009-10-09 Thread Matt Davies
Hello everyone Ubuntu 8.04 64bit Rails 2.3.2 I have multiple IP addresses on a server, with an alias setup to handle it eth0:0 IP 1.1.1.2 eth0 IP 1.1.1.1 We run one app on one IP, and the other on the other IP(ssl restrictions) The app on 1.1.1.1 is allowed to send mail through our gateway.

[Rails] XML into database

2009-10-09 Thread jhaagmans
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. Using XML we'll define a few common i

[Rails] Re: Return "title" column if "caption" column is empty?

2009-10-09 Thread Chris
def caption self[:caption] || title end On Oct 8, 5:11 am, Joshua Muheim wrote: > Hi all > > Oh my god, this really shouldn't be a tough one, but I just don't get > it. ;-) > > class Page < ActiveRecord::Base >   def caption >     caption ? caption : title >   end > end > > I want to return th

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Trausti Thor Johannsson
I mainly use On the Job, but that is single user. I would use basecamp if I was working with others. Trausti On Fri, Oct 9, 2009 at 10:34 AM, Leonardo Mateo wrote: > > On Fri, Oct 9, 2009 at 10:12 AM, CNNN NICK > wrote: > > > > Hi, > > > > Was wondering what are the tools that freelance develo

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Leonardo Mateo
On Fri, Oct 9, 2009 at 10:12 AM, CNNN NICK wrote: > > Hi, > > Was wondering what are the tools that freelance developers are using to > track time, project progress and collaboration? > > I'm sure there are plenty of Rails based online apps but which are the > best and why? I'm very happy with r

[Rails] Ruby on Rails POC

2009-10-09 Thread miti
Hi, We recently created a Ruby on Rails POC, which landed us with a client. More about this initiative at http://www.articlesbase.com/information-technology-articles/cpal-a-ruby-on-rails-poc-1316554.html Thanks, Miti --~--~-~--~~~---~--~~ You rece

[Rails] Re: Definitive guide to Rake commands

2009-10-09 Thread Rob Nichols
Thank you again Conrad. I have answered the question that started me down this path. That was, is there a simpler form of rake db:migrate that I could use to migrate non-development databases. However, the reason I posted here was because I thought I may have missed a resource somewhere that

[Rails] Best RoR developer freelance tools

2009-10-09 Thread CNNN NICK
Hi, Was wondering what are the tools that freelance developers are using to track time, project progress and collaboration? I'm sure there are plenty of Rails based online apps but which are the best and why? Cheers, Costa -- Posted via http://www.ruby-forum.com/. --~--~-~--~~---

[Rails] Re: Calling partials from onother controller/view

2009-10-09 Thread Colin Law
2009/10/8 Nuno Neves : > > Jeff Burlysystems wrote: >> To render the partial, try: >> >> ... >>    <%= render :partial=>'shared/albums' %> >> ... >> >> Jeff >> >> On Oct 8, 2:09�am, Nuno Neves > > No luck :( > when you say 'No luck' do you mean you see nothing in the browser or there is some sor

[Rails] Re: rails: command not found on Debian lenny

2009-10-09 Thread Leonardo Mateo
On Thu, Oct 8, 2009 at 9:44 PM, kitty00 wrote: > > How do I create symlink for rails? > I could not find where it is installed by gem. > > When I did symlink for gem. I found out that I had /usr/bin/gem1.8 > instead of /usr/bin/gem. > But this is not the case for rails. > > I found rails folder a