[Rails] Re: How to remove ^M at the end of each line?

2009-07-10 Thread Andrew Timberlake
On Sat, Jul 11, 2009 at 12:42 AM, Conrad Taylor wrote: > On Fri, Jul 10, 2009 at 1:22 PM, Colin Law wrote: >> >> 2009/7/10 Zhao Yi : >> > >> > I got a string from "text_area_tag". Because the browser working on >> > windows while my rails server working on linux, there is ^M at the end >> > of ea

[Rails] Re: Render a whole HTML page after an Ajax request: possible?

2009-07-10 Thread Andrew Timberlake
On Fri, Jul 10, 2009 at 12:36 PM, Tom Ha wrote: > > Hi there, > > Suppose: 'action A' was launched by an Ajax request > > Question: Is it possible to > - somehow render a whole HTML page (not only return a part of the page), > or > - redirect (within 'action A') to an 'action B' (which then could

[Rails] using jQuery for remote_for

2009-07-10 Thread Qaiser Wali
i tired removing all prototype files and just using jQuery with jrails and for some reason this does not work in ff and ie. Any one has any idea how to fix this. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread Sijo Kg
Hi Can you try like The following can be moved to lib module ActiveRecord class Base def self.to_csv(sql_statement) self.connection.instance_variable_get(:@connection).exec("copy (#{sql_statement}) TO STDOUT WITH CSV") csv = [] while (line = pg_conn.getline) != "\\."

[Rails] Re: ./script/about with ruby 1.9.1

2009-07-10 Thread Conrad Taylor
Hi, the performance you'll see is for Ruby code execution. You can try running the Rails tests or the Ruby spec tests. Also, you can try using Apache Bench with concurrency greater than 4 targeting pages which require more Ruby code execution paths. Good luck, -Conrad Sent from my iPhon

[Rails] Re: conditional link_to_remote not re-rendering

2009-07-10 Thread JannaB
I'm stumped here -- well aware that link_to_remote is intended to do something other than what I am trying to use it for. You see, I need to create a sort of button, that takes an image and that has different looks (css styles, depending upon the state of a variable), that works without rendering

[Rails] Re: ./script/about with ruby 1.9.1

2009-07-10 Thread Sijo Kg
Hi Thanks for your it worked Now to test the performance difference between Ruby1.9.1 and ruby 1.8.6 with rails 2.3.2 what I did is Created a rails projects using 1.9.1 and 1.8.6 Then created a model and migrated it to the db using 1.8.6 Ruby+rails Now from the project created using the 1.

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread Jeffrey L. Taylor
Several years ago when I first heard about the Presenter, it didn't make sense. Unneeded complexity. But now maybe I've encountered the problem(s) it is a solution to. I'll look at it. Thanks, Jeffrey Quoting s.ross : > > Check out the Presenter pattern. This might help out a bit: > http

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread s.ross
Check out the Presenter pattern. This might help out a bit: http://blog.jayfields.com/2007/03/rails-presenter-pattern.html On Jul 10, 2009, at 4:47 PM, Jeffrey L. Taylor wrote: > > Quoting s.ross : >> >> Hello-- >> >> >> On Jul 10, 2009, at 2:40 PM, Jeffrey L. Taylor wrote: >> >>> >>> Quoting

[Rails] Re: wiki built on rails

2009-07-10 Thread Walter McGinnis
The open source Rails appliction I work on is wiki-inspired, but much more than a wiki. You can check it out here: http://kete.net.nz/ To explore other options, besides google, you might want to do a search of github.com repositories and also take a look here: http://www.opensourcerails.com/ Ch

[Rails] Re: How to validate with validates_associated

2009-07-10 Thread Terry Walker
It would help if you would show test code which demonstrates the failing validation. -- 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

[Rails] Re: ActionController::RoutingError (Recognition failed for "/dis

2009-07-10 Thread Jim Lum
Jim Lum wrote: > Hi, > > I'm just getting started with Ruby on Rails, and I'm having to make some > modifications to an existing system and RoR app that uses lighttpd with > the RoR web app. > > Basically, what I'm trying to do is somehow add a header area to all the > web app pages. Since this

[Rails] conditional link_to_remote not re-rendering

2009-07-10 Thread JannaB
I have an int, 'floorfrozen,' in my table, 'channels' that can take a value of 0 or 1. When I render a page, an image in a link_to_remote is called differently depending what the value of channel.floorfrozen is, in a partial, as follows: <% if @channel.floorfrozen %> <%= link_to_remote image_tag

[Rails] ActionController::RoutingError (Recognition failed for "/dis

2009-07-10 Thread Jim Lum
Hi, I'm just getting started with Ruby on Rails, and I'm having to make some modifications to an existing system and RoR app that uses lighttpd with the RoR web app. Basically, what I'm trying to do is somehow add a header area to all the web app pages. Since this RoR is part of a 3rd party pro

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread Jeffrey L. Taylor
Quoting s.ross : > > Hello-- > > > On Jul 10, 2009, at 2:40 PM, Jeffrey L. Taylor wrote: > > > > > Quoting Colin Law : > >> > >> 2009/7/10 Jeffrey L. Taylor : > >>> > >>> My Web application has several contexts where a collection of > >>> ActiveRecords is > >>> rendered. If the URL containe

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread s.ross
Hello-- On Jul 10, 2009, at 2:40 PM, Jeffrey L. Taylor wrote: > > Quoting Colin Law : >> >> 2009/7/10 Jeffrey L. Taylor : >>> >>> My Web application has several contexts where a collection of >>> ActiveRecords is >>> rendered. If the URL contained the partial and/or layout, the >>> several

[Rails] Re: dynamic paths

2009-07-10 Thread Älphä Blüë
Hi Bob, It depends on how you have your controllers setup - really. For instance, I have a Universal controller template that 37 other controllers use. class UniversalTemplatesController < ApplicationController def index @objects = params[:controller].singularize.camelize.constantize.f

[Rails] Re: How to remove ^M at the end of each line?

2009-07-10 Thread Conrad Taylor
On Fri, Jul 10, 2009 at 1:22 PM, Colin Law wrote: > > 2009/7/10 Zhao Yi : > > > > I got a string from "text_area_tag". Because the browser working on > > windows while my rails server working on linux, there is ^M at the end > > of each line. What I want to do is to remove this character and sepa

[Rails] Re: LogIn Button using remote_function

2009-07-10 Thread Älphä Blüë
Also, I'd recommend following this set of screen learning apps (they are free) http://www.buildingwebapps.com/learningrails When you get to lesson 11, it covers user authentication in great detail. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~---

[Rails] Re: LogIn Button using remote_function

2009-07-10 Thread Älphä Blüë
Hi Julia, First, I'll touch on some of the things you may or may not know. IRB is something you use to test ruby code, specific to the ruby interpreter. script/console or the Rails console is what you use to test rails code, specific to rails. So, it's better to get used to using the console

[Rails] Re: How to use remote_function??

2009-07-10 Thread bill walton
Hi Julia, On Fri, 2009-07-10 at 23:19 +0200, Julia Lovel wrote: As far as your view, take a look at form_remote_tag or form_remote_for. HTH, Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: T

[Rails] Re: dynamic paths

2009-07-10 Thread Bob O
excellent. thank you. i further step. I have a polymorphic association where im trying to achieve something similar. im feeding an xml file to a swf. the xml iterates over the poly model, but it belongs_to many different objects. but the xml file is called from the poly controller. so the abo

[Rails] Re: dynamic paths

2009-07-10 Thread Älphä Blüë
Bob O wrote: > does anyone know how i can make dynamic paths? > > say i had a partial for maybe an index list, but i want the link to > the show page to be dynamic so im able to use the partial for may > objects. > > <%= link_to "show", "#{object}" + _path(object) %> > > something along those l

[Rails] dynamic paths

2009-07-10 Thread Bob O
does anyone know how i can make dynamic paths? say i had a partial for maybe an index list, but i want the link to the show page to be dynamic so im able to use the partial for may objects. <%= link_to "show", "#{object}" + _path(object) %> something along those lines. --~--~-~--~~-

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread Älphä Blüë
Work at implementing Helpers into your app. You can outline your pagination methods in many different helper models and keep things transparent on your views as well as make things more manageable for yourself. For instance, Let's say you have a number of pagination views you are going to us

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread Michael Schuerig
On Friday 10 July 2009, gsterndale wrote: > I agree 100% that using FasterCSV and ActiveRecord to pull the data > is much more portable (and elegant). In fact, that's how I'm doing it > now. However, this is a huge dataset that is causing server timeouts > and hogs memory. I'm investigating csv ge

[Rails] Re: text_field_with_auto_complete

2009-07-10 Thread bill walton
On Fri, 2009-07-10 at 22:08 +0200, Shandy Nantz wrote: > bill walton wrote: > > Hi Shandy, > > > > On Fri, 2009-07-10 at 21:34 +0200, Shandy Nantz wrote: > >> I need to pass a parameter in my text_field_with_auto_complete > > > > What's the parameter supposed to do? What are you trying to acco

[Rails] Re: LogIn Button using remote_function

2009-07-10 Thread Julia Lovel
Thanks so much for the feedback Fred! This is my first rails project that I'm writing, so I need lots of help. The java script tags were an error I noticed right after I posted, I usually put it in the head. Not intentional. But, as far as the many real problems with my code, could you give me s

[Rails] Re: Database saving empty records

2009-07-10 Thread Whiplash
Thanks Fred, starting to understand now. :-) Dana On Jul 10, 8:59 am, Frederick Cheung wrote: > On Jul 10, 4:46 pm, Whiplash wrote: > > > @motorcycle= Motorcycle.new > > @motorcycle.make = params['make'] > > @motorcycle.model = params['model'] > > @motorcycle.year = params['year'] > > @motorc

[Rails] Rendering from a filter class

2009-07-10 Thread Bill Kocik
I'm defining an around filter as its own class. The documentation on ActionController::Filters::ClassMethods includes this example: class Authorizer # This will run before the action. Redirecting aborts the action. def before(controller) unless user.authorized? redirect_to

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread Jeffrey L. Taylor
Quoting Colin Law : > > 2009/7/10 Jeffrey L. Taylor : > > > > My Web application has several contexts where a collection of ActiveRecords > > is > > rendered.  If the URL contained the partial and/or layout, the several > > controller methods could be collapsed into one.  What hazards, etc. lie

[Rails] Re: LogIn Button using remote_function

2009-07-10 Thread Frederick Cheung
On Jul 10, 10:13 pm, Julia Lovel wrote: > User name: > <%= text_field("userform", "user_name",:size=>"20" ) %> > Password: > <%= password_field("userform", "password",:size=>"20" ) > %> >  <%= javascript_include_tag :defaults %> > <%= submit_tag 'LOG IN', :onclick =>remote_function(:url => > {

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
Ha i did it again sorry: class Address < ActiveRecord::Base belongs_to :person #!!! end Ok it's Friday I need to go away ! On Fri, Jul 10, 2009 at 5:33 PM, Rick wrote: > UGG! I feel so bad. > > Stupid copy and paste error! Amazing I could be  staring at something > and no

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
UGG! I feel so bad. Stupid copy and paste error! Amazing I could be staring at something and not even see it. I was translating something else into Person/Color/Address from what I was working with "Product" and totally screwed up and put Product down since it was on my mind instead of Pers

[Rails] Seed fu and restful_authentication

2009-07-10 Thread Marcos Cruz
Hi, I am trying to use both plugins in my application but I couldn't get it to work. I have included the following in my users.rb(fixtures directory): user = User.seed(:login) do |s| s.login = "admin" s.email = "ad...@example.com" s.password = "admin" s.password_confirmation = "admin" en

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Älphä Blüë
Using what I posted above you need to have the following: In your Address model you need to have a person_id product_id If you want these foreign keys to be different you can do the following: Class Address belongs_to :person belongs_to :product :foreign_key => uniquesomething_id end W

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread Philip Hallstrom
On Jul 10, 2009, at 1:27 PM, gsterndale wrote: > > Thanks Philip, > > The Postgres gem rdoc hasn't been much help. All of the PGresult > instance methods that retrieve values require a tuple number. My > PGresult has a number of fields, but not tuples (rows). > > This query (when run in psql) r

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Älphä Blüë
Rick wrote: > And thanks for the links by the way. > > But looking at the second link they show: > > class Customer < ActiveRecord::Base >has_many :orders, :dependent => :destroy > end > > class Order < ActiveRecord::Base >belongs_to :customer > end > > How is that any different than m

[Rails] How to use remote_function??

2009-07-10 Thread Julia Lovel
I am trying to make a very simple login page that has light-box like features. The only thing I cannot get to work is the behavior of the actual login button. When you click on it it does nothing. I simply want to submit the info given by the client and redirect either to a private page or make th

[Rails] LogIn Button using remote_function

2009-07-10 Thread Julia Lovel
I am trying to make a very simple login page that has light-box like features. The only thing I cannot get to work is the behavior of the actual login button. When you click on it it does nothing. I simply want to submit the info given by the client and redirect either to a private page or make th

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread gsterndale
I found a temporary work-around where I ask PostgreSQL to save the output in a file instead of stdout... >> sql = "COPY (select * from users) TO '/tmp/file.csv' WITH CSV HEADER;" => "COPY (select * from users) TO '/tmp/file.csv' WITH CSV HEADER;" >> ActiveRecord::Base.connection.execute(sql) SQ

[Rails] Re: What's the most RESTful approach here?

2009-07-10 Thread Gavin
thanks Rob, I also think this is the most simple approach but was really keen to get a 2nd opinion. Gavin On Jul 10, 7:59 pm, Rob Biedenharn wrote: > On Jul 10, 2009, at 12:55 PM, Gavin wrote: > > > > > Hi all > > > I'm working on an app at the moment and I'm trying to think of the > > most

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
And thanks for the links by the way. But looking at the second link they show: class Customer < ActiveRecord::Base has_many :orders, :dependent => :destroy end class Order < ActiveRecord::Base belongs_to :customer end How is that any different than my association for Person and Address (

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
On Fri, Jul 10, 2009 at 3:58 PM, Älphä Blüë wrote: > Looking at what you provides so far let's go ahead and diagram it > exactly the way you wrote it and see what's wrong here.  I'm leaving off > activerecord base for sake of clarity... > > class Person >  belongs_to :favorite_color, :class_name

[Rails] Re: accessing model attribute name dynamically

2009-07-10 Thread Jamey Cribbs
How about: @meta.send("#{field}=", content) Jamey On Fri, Jul 10, 2009 at 4:31 PM, Dan Berger wrote: > > I'm calling this action from within another action: > > edit_meta(@table_meta_id, @field, @content) > > where @field is an attribute name for a Model. @table_meta_id is the id > and @conten

[Rails] accessing model attribute name dynamically

2009-07-10 Thread Dan Berger
I'm calling this action from within another action: edit_meta(@table_meta_id, @field, @content) where @field is an attribute name for a Model. @table_meta_id is the id and @content is the new value for that attribute. The edit_meta action looks like this: def edit_meta(id, field, content)

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread gsterndale
Thanks Philip, The Postgres gem rdoc hasn't been much help. All of the PGresult instance methods that retrieve values require a tuple number. My PGresult has a number of fields, but not tuples (rows). This query (when run in psql) returns a large block of text. For example: email,fname,lname,cr

[Rails] Re: How to remove ^M at the end of each line?

2009-07-10 Thread Colin Law
2009/7/10 Zhao Yi : > > I got a string from "text_area_tag". Because the browser working on > windows while my rails server working on linux, there is ^M at the end > of each line. What I want to do is to remove this character and separate > the string to an array. How can I do this? > Can I just

[Rails] Re: How to use different key than :id in route?

2009-07-10 Thread Ben Wilson
On Jul 7, 1:32 am, Rails List wrote: > BenWilsonwrote: > > Okay, so I'm trying to have a URL like the following (which uses a key > > generated at random): > > > societies/6b241c631c6beaa89c889b9fb388caef9f617900ca1eff > > societies/6b241c631c6beaa89c889b9fb388caef9f617900ca1eff/edit > > > Where

[Rails] Re: text_field_with_auto_complete

2009-07-10 Thread Shandy Nantz
bill walton wrote: > Hi Shandy, > > On Fri, 2009-07-10 at 21:34 +0200, Shandy Nantz wrote: >> I need to pass a parameter in my text_field_with_auto_complete > > What's the parameter supposed to do? What are you trying to accomplish? > > Bill Well, I have an auto_complete to get users names,

[Rails] Re: ActiveRecord, PostgreSQL question

2009-07-10 Thread Philip Hallstrom
> I'm using ActiveRecord's connection to execute a custom query (which > runs fine in psql) like this: > >>> result = ActiveRecord::Base.connection.execute("COPY (select * >>> from users) TO STDOUT WITH CSV;") > SQL (0.8ms) COPY (select * from users) TO STDOUT WITH CSV; > => # >>> result.nfie

[Rails] Re: Skinny Controller, Fat View?

2009-07-10 Thread Colin Law
2009/7/10 Jeffrey L. Taylor : > > My Web application has several contexts where a collection of ActiveRecords is > rendered.  If the URL contained the partial and/or layout, the several > controller methods could be collapsed into one.  What hazards, etc. lie that > way? I, for one, do not unders

[Rails] ActiveRecord, PostgreSQL question

2009-07-10 Thread gsterndale
I'm using ActiveRecord's connection to execute a custom query (which runs fine in psql) like this: >> result = ActiveRecord::Base.connection.execute("COPY (select * from users) >> TO STDOUT WITH CSV;") SQL (0.8ms) COPY (select * from users) TO STDOUT WITH CSV; => # >> result.nfields => 39 >>

[Rails] Re: Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Älphä Blüë
Here's a diagram which might help with your model: http://learn.kohanaphp.com/wp-content/uploads/2008/04/ruby-on-rails-data-relationships.png Make sure you also check: http://guides.rubyonrails.org/association_basics.html The best advice I can give you is to draw a complete diagr

[Rails] Re: text_field_with_auto_complete

2009-07-10 Thread bill walton
Hi Shandy, On Fri, 2009-07-10 at 21:34 +0200, Shandy Nantz wrote: > I need to pass a parameter in my text_field_with_auto_complete What's the parameter supposed to do? What are you trying to accomplish? Bill --~--~-~--~~~---~--~~ You received this message b

[Rails] Re: New to Rails? Read This

2009-07-10 Thread Älphä Blüë
Testing Rails can be cumbersome but it's also very necessary. You can hand-test all your code and do the greatest job possible but in the end, it won't be enough. So, you should become familiar with a few testing platforms you can use with rails. By default, whenever you create anything new

[Rails] text_field_with_auto_complete

2009-07-10 Thread Shandy Nantz
I need to pass a parameter in my text_field_with_auto_complete and am struggling to discover how to do this. I have something like this: <%= text_field_with_auto_complete 'user', 'username', {}, {:with => "'post='@company_title.id"} %> but because it is in a partial that pops as a result from a

[Rails] Quick simple check: Very simple relationship setup (newbish for sure.)

2009-07-10 Thread Rick
Been googling trying to understand belongs_to, has_one, etc For this scenario: 'A Person has a single favorite color and has multiple addresses. (Colors are reused across all the persons, addresses are always unique only for one person)' Would the following suffice? (not worrying about adding in

[Rails] Re: Looking for more guinea pigs, new icalendar gem

2009-07-10 Thread adamwest
This is awesome! I was looking for a clean iCal implementation for Ruby, great minds think alike. I'll be playing with this over the weekend, building a simple rails app to test out its features. I might try to write some code to synchronize local and external (google) calendars, we'll see how th

[Rails] Re: Storing Images in Database or File System?

2009-07-10 Thread Eric
Storing in the filesystem avoids database and app overhead, while also allowing files to be moved to a different server if desired. As for Imagemagick and rMagick and Rails, the IM part is simply to install it and make sure your PATH includes IM's bin directory, as the conversion process is prett

[Rails] Re: What's the most RESTful approach here?

2009-07-10 Thread Rob Biedenharn
On Jul 10, 2009, at 12:55 PM, Gavin wrote: > Hi all > > I'm working on an app at the moment and I'm trying to think of the > most RESTful way of implementing one of the key parts of the site. > > Some advice on the best approach would really help. > > To give you an example, I have one model but i

[Rails] Re: Storing Images in Database or File System?

2009-07-10 Thread SS
Thank you all for your responses. What I'm trying to achieve is allowing users to post their photos on the website and give them ability to search for photos of others. Therefore, I'm dealing with large number of files, not so much with large size of files. Arzumy, you mentioned the Paperclip lib

[Rails] Re: has_many :through habtm

2009-07-10 Thread slava
yeah, I think it is sufficient. thanks. --~--~-~--~~~---~--~~ 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 grou

[Rails] Re: Puts just work on Controllers

2009-07-10 Thread byrnejb
On Jul 10, 5:33 am, Damaris Fuentes wrote: > Ok, I will take a look to these ways for debug. > However, I still don't understand why my "puts" don't work. > My non-Active record models are not in the app/model directory, but in > an app/engine directory (is someone else work), can be this the p

[Rails] Re: observe_field on select

2009-07-10 Thread bill walton
On Thu, 2009-07-09 at 18:34 -0700, JannaB wrote: > My problem thus is if someone selects the 0th item in the select box, > types in a value, the observe_field still picks it up in my controller > as "" for params['channelnotes']. observe_field fires, by default, on the change event. There used t

[Rails] Re: has_many :through habtm

2009-07-10 Thread Matt Jones
As written, there's no direct way to do this association in Rails. But wouldn't it be sufficient to use a plain has_many :products in Catalog? You've got a corresponding belongs_to in Product... --Matt Jones On Jul 9, 6:42 pm, slava wrote: > Here is my setup: > > class Product < ActiveRecord::B

[Rails] Re: How to check if a table is empty ?

2009-07-10 Thread melomane
Nice approach, thanks I did it and it works now. --~--~-~--~~~---~--~~ 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

[Rails] vote on my project what you want me to work on

2009-07-10 Thread Roger Pack
I am conducting a survey of what projects people think would be most beneficial to the Ruby[ /rails ] community. http://www.ruby-forum.com/topic/191246#new Explains it all if you'd like to vote! Also another option not listed is that I could help work on an open source, free equivalent of TextM

[Rails] What's the most RESTful approach here?

2009-07-10 Thread Gavin
Hi all I'm working on an app at the moment and I'm trying to think of the most RESTful way of implementing one of the key parts of the site. Some advice on the best approach would really help. To give you an example, I have one model but it's split into three different categories: lost, found,

[Rails] Re: rdiscount Deadlock !

2009-07-10 Thread Roger Pack
> Missing these required gems: > rdiscount = 1.3.1.1 comment out the line that requires this gem version :) ? =r -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: Problem deploying app on bluehost

2009-07-10 Thread Roger Pack
saurabh wrote: > Hi , > I am new to ror and deploying my first app spot.us on bluehost , I am > getting the following error : > > Application error > Rails application failed to start properly > > I google and found that it may have something to do with .htaccess > file. Please suggest what can

[Rails] Re: wiki built on rails

2009-07-10 Thread Gavin
"Rookie" Love the name :) --~--~-~--~~~---~--~~ 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 em

[Rails] Re: How to check if a table is empty ?

2009-07-10 Thread Cyril Lavedrine
Hello, For the first part of your problem, you can check emptiness for your table Example with Example.find(:all).empty? => boolean For the second part, @object = Example.find(:first) your_path = example_path(@object) Of course you can probably do it with a better looking method, but basically t

[Rails] Re: newbie: rake db:migrate

2009-07-10 Thread PB0711
Umm yes ok I just got pointed to http://antono.info/en/138 which told me that it's an apt-get install issue. thank you On Jul 10, 5:05 pm, PB0711 wrote: > Hello all, > > I'm sure that this has been asked somewhere and probably answered but > I can't seem to find it searching, so I'll ask. > >

[Rails] newbie: rake db:migrate

2009-07-10 Thread PB0711
Hello all, I'm sure that this has been asked somewhere and probably answered but I can't seem to find it searching, so I'll ask. I'm following the wiki rails (http://wiki.rubyonrails.org/getting- started/first-rails-app-walkthrough) walkthrough and when I run 'rake db:migrate' I get an abort. An

[Rails] Re: Database saving empty records

2009-07-10 Thread Frederick Cheung
On Jul 10, 4:46 pm, Whiplash wrote: > @motorcycle= Motorcycle.new > @motorcycle.make = params['make'] > @motorcycle.model = params['model'] > @motorcycle.year = params['year'] > @motorcycle.save > > And that works! > > So my question becoms, why do I have to manually assign the parameters > wh

[Rails] How to check if a table is empty ?

2009-07-10 Thread melomane
Hi In my web application, a table must have only one record. So when there is no record, user can add a new row to the table, (a add link is shown) and when a record is already available, user can't add a new one, he can just edit or destroy it( after destroying the current one, no more records e

[Rails] Re: Database saving empty records

2009-07-10 Thread Whiplash
Alright I figured out how to get it to work, but I'm still not sure why. First off, I was using the form_tag method of creating forms. Then in my controller I was doing @motorycle = Motorcycle.new(params[:motorcycle]) @motorcycle.save This did not work. What I've done now is change the controll

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-10 Thread Pepe Junty
Marnen Laibow-Koser wrote: > Shouldn't matter. Most Rails apps are DB-neutral enough that Heroku > should support them just fine. this particular app uses mysql specific features. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: get email address as param and send email

2009-07-10 Thread Cyril Lavedrine
Hi, There's a base class for that stuff, ActionMailer : http://api.rubyonrails.org/classes/ActionMailer/Base.html You juste have to take the address you got from the form and send an email following the described procedure. You can even send attachments ^^ If you want further details feel free to

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-10 Thread Marnen Laibow-Koser
Pepe Junty wrote: > heroku seems very nice, i was about to deploy an app there to > check it out but they do not support mysql. :( Shouldn't matter. Most Rails apps are DB-neutral enough that Heroku should support them just fine. (And PostgreSQL, which Heroku uses, is a better DB anyway...) B

[Rails] get email address as param and send email

2009-07-10 Thread Ghazal Mir
hi how can i get email address as an input param from user and then send email to that address? thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-10 Thread Pepe Junty
heroku seems very nice, i was about to deploy an app there to check it out but they do not support mysql. :( -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: Problem with switching rails 2.2.2. application to production

2009-07-10 Thread sultan
After making changes to environment.rb to switch to production, I had to stop and restart the server. When you asked why I ran “ruby dispatch.fcgi”, I did some research and got it working with “RAILS_ENV=production ./dispatch.fcgi” Thanks for your help. On Jul 9, 8:15 pm, Nicholas Henry wrote:

[Rails] Re: wiki built on rails

2009-07-10 Thread Marnen Laibow-Koser
Arun Kumar wrote: > Hi everyone, > > can you please give me few examples of wikis built in rails? Have you tried a Google search? That should give you some results. If you're trying to roll your own, you might be interested in Rookie. This is a project I've started to parse MediaWiki markup i

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-10 Thread Marnen Laibow-Koser
Bryan Ash wrote: > Tony, > > If you're looking for super simple deployment, I'd recommend switching > to http://Heroku.com. It doesn't get any simpler and their entry > level service is free. Yeah, Heroku is wonderful and beautifully designed -- except that it doesn't work. Really, I *so* w

[Rails] Re: Database saving empty records

2009-07-10 Thread Frederick Cheung
On Jul 10, 6:56 am, Whiplash wrote: > As you can see by the following console output, the parameters are > being posted properly, but for some reason they are not being entered > into the database. I'm not doing any validations or anything else. I'm > also not receiving any errors. > > What's

[Rails] Re: ./script/about with ruby 1.9.1

2009-07-10 Thread Frederick Cheung
On Jul 10, 1:25 pm, Sijo Kg wrote: > Hi In my machine there is Ruby1.8.6 ,1.9.1 and rails 2.3.2 And I created > a new project using Ruby1.9.1 and rails 2.3.2 But when did > ./script/about it shows > Ruby version              1.8.6 (i386-linux) > RubyGems version          1.3.1 > >    Why this h

[Rails] Re: Database saving empty records

2009-07-10 Thread Jeffrey L. Taylor
Quoting Whiplash : > > I've seen some similar questions to this but I cannot find the answer. > I have a simple form that is supposed to save some values into the > database. However, when I call save, the record is saved with null > values instead of the values provided in the form. > > As you

[Rails] Re: Render a whole HTML page after an Ajax request: possible

2009-07-10 Thread Tom Ha
And I'd been starting to think I had to call McGyver... Great! Thanks, Sijo! -- 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 g

[Rails] Re: An implementation question

2009-07-10 Thread Felix Schäfer
Am 10.07.2009 um 12:04 schrieb Sijo Kg: >This is an implementation question. I have various reports to be > generated in my application like PDF reports, Excel reports etc So I > tried like a main class Application report and all the other report > types its sub classes For example > TicketEx

[Rails] Re: replace the default home page

2009-07-10 Thread Cyril Lavedrine
Hello, First, you should delete the file public/index.html if you want another controller to be called on your home page. Once it's done, you just have to add the line map.root :controller => 'your_controller' (and maybe the action required if it's not index) to your config/routes.rb and it's

[Rails] Re: replace the default home page

2009-07-10 Thread Sijo Kg
Delete or rename public/index.html ? Sijo -- 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

[Rails] ./script/about with ruby 1.9.1

2009-07-10 Thread Sijo Kg
Hi In my machine there is Ruby1.8.6 ,1.9.1 and rails 2.3.2 And I created a new project using Ruby1.9.1 and rails 2.3.2 But when did ./script/about it shows Ruby version 1.8.6 (i386-linux) RubyGems version 1.3.1 Why this happens Thanks in advance Sijo -- Posted via http:

[Rails] (Jobs) Technical Ruby Engineers/Developers - Would you like to be recognized for your contributions and take your career to the next level?

2009-07-10 Thread Marta
Hi, One of my client companies is looking for 3 Ruby Engineers – one entry level (front end) plus 1 – 2 yrs of experience, one senior level ruby engineer (front- end) and one senior engineer (backend). I’m looking for smart engineers, who like to work in a highly collaborative agile environment

[Rails] Re: Controller Method .. ?

2009-07-10 Thread Hemant Bhargava
Got it .. Hemant Bhargava wrote: > How to call a method of a controller into .. > 1) another controller .. > 2) another model .. > > > .. Do u guys have any idea .. ? .. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messag

[Rails] replace the default home page

2009-07-10 Thread Vikas
How to replace the default home page. I tried map.root but it didn't work. I should request to please provide me ways. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this grou

[Rails] wiki built on rails

2009-07-10 Thread Arun Kumar
Hi everyone, can you please give me few examples of wikis built in rails? Thanks in advance, Ak -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr

[Rails] Controller Method .. ?

2009-07-10 Thread Hemant Bhargava
How to call a method of a controller into .. 1) another controller .. 2) another model .. .. Do u guys have any idea .. ? .. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[Rails] Re: Deployment on Dreamhost - Application Error

2009-07-10 Thread Bryan Ash
Tony, If you're looking for super simple deployment, I'd recommend switching to http://Heroku.com. It doesn't get any simpler and their entry level service is free. You should have your application deployed in less than 30 minutes. Bryan --~--~-~--~~~---~--~~ Yo

  1   2   >