[Rails] Scaffolding

2010-07-01 Thread Hemant Bhargava
Hello All, I am using scaffolding but i can not figure out that how to write my own methods except CRUD. I mean i know how to use CRUD methods but if i write my own method in my controller and call that from views then the request is going to show method. Ok.. the scenario is that have an method

[Rails] Re: best way to internationalize content from database

2010-07-01 Thread Marnen Laibow-Koser
Anderson Leite wrote: > Hello Marnen > > "keep translated strings in PO files " > > but think about a content management system that users put information > about a new protuct in english and portuguese. > > It's easy to use i18n for labels...but.what about the product > description ?? >

[Rails] Re: How do you deploy RoR? Newb alert!

2010-07-01 Thread Marnen Laibow-Koser
Fernando Perez wrote: >> I'm just worried I'm going to waste money on an outdated book :) >> >> Thanks again for your time. >> Jeremy > > The book is overbloat. The author suggests to run your rails setup in a > Xen virtual machine! Well he sells rails hosting... > > Capistrano is not necessary

[Rails] Re: Close Modalpopup with RJS

2010-07-01 Thread Chris Kalaboukis
can anyone help me here. i assume that there is a way to do this... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsu

[Rails] Re: Second App in localhost

2010-07-01 Thread RailsFan Radha
Ofcourse, my "firstapp" and "secondapp" (both) are ruby on rails apps. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To u

[Rails] Second App in localhost

2010-07-01 Thread RailsFan Radha
Env: In VirtualBox / Ubuntu Lucid / current stable version of Ruby on Rails / Apache2 / Passenger I have one app called "firstapp" hosted in my localhost I think i added one entry to apache2.conf file to view this app from the browser. So, now i can access this from the browser 127.0.0.1:3000 No

[Rails] Re: rails 3 submit_to_remote

2010-07-01 Thread Me
anybody? On Jun 30, 6:49 pm, Me wrote: > How do you do ajax functions likesubmit_to_remoteor link_to_remote > to ajax update stuff on the page inrails3? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email t

[Rails] Re: active record question

2010-07-01 Thread RailsFan Radha
You could either use the find_by_sql method or the :joins method. (As someone has stated earlier that avoid find_by_sql for performance and maintanence reasons) sample sql to put in find_by_sql in your model select question_id from responses r1 where not exists (select question_id from questio

[Rails] Re: How do you deploy RoR? Newb alert!

2010-07-01 Thread Ali Imran
no i am talking about github .. remote repository,, because lot of tutorials i go through are pointing towards this... On Jul 1, 5:32 pm, Hassan Schroeder wrote: > On Thu, Jul 1, 2010 at 3:54 PM, Ali Imran wrote: > > I looked for the way to use any thing else other than GIT, because it > > is

[Rails] Re: check for new record?

2010-07-01 Thread badnaam
I will try, I am a newb not sure how to do tests On Jul 1, 6:49 pm, Hassan Schroeder wrote: > On Thu, Jul 1, 2010 at 6:09 PM, badnaam wrote: > > Strangely, this method returns true for an update > > Can you post a simple test case demonstrating this behavior? > > -- > Hassan Schroeder --

Re: [Rails] Re: check for new record?

2010-07-01 Thread Hassan Schroeder
On Thu, Jul 1, 2010 at 6:09 PM, badnaam wrote: > Strangely, this method returns true for an update Can you post a simple test case demonstrating this behavior? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -- You received this message because you are

[Rails] Re: check for new record?

2010-07-01 Thread RailsFan Radha
i'm trying to see if any would return false in your case, as the record already exists for update. stumbled upon this: https://rails.lighthouseapp.com/projects/8994/tickets/1219-new_record-not-set-when-using-joins let me know if there is any clue here? (assert ?) badnaam wrote: > Well so it

[Rails] Re: check for new record?

2010-07-01 Thread badnaam
Well so its of no use if one wants to check if the record is a brand new record or an updated one On Jul 1, 6:13 pm, RailsFan Radha wrote: > I just read this from the "Simply Rails 2" book > > model.new_record? > If it is not yet saved, will return true. > If saved, will return false. > > Excerpt

[Rails] active record question

2010-07-01 Thread badnaam
I have three models, Question, Response and User User has many question, :through Responses My response table has 3 main columns response, question_id and user_id. The use case is lets say the user can respond to 100 question, but during a session he responds to 20. How do I find out the ones he

[Rails] Re: check for new record?

2010-07-01 Thread RailsFan Radha
I just read this from the "Simply Rails 2" book model.new_record? If it is not yet saved, will return true. If saved, will return false. Excerpt from this book: >From the Rails console, let’s create this Story class, and an instance of the class called story, by entering these commands: >> clas

[Rails] Re: check for new record?

2010-07-01 Thread badnaam
Strangely, this method returns true for an update, thats why I wasnt sure. Does this only check if that "self" instance has been saved or not? On Jul 1, 6:03 pm, Filipe Quadros Borges wrote: > try '@record.new_record' > > http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001843 > > O

Re: [Rails] check for new record?

2010-07-01 Thread Filipe Quadros Borges
try '@record.new_record' http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001843 On Thu, Jul 1, 2010 at 9:57 PM, badnaam wrote: > Is it possible to check if the record that is about to be saved is a > brand new record or an update? I am trying to do this inside a > before_save callback

Re: [Rails] Date issues

2010-07-01 Thread Hassan Schroeder
On Thu, Jul 1, 2010 at 2:39 PM, melomane wrote: > Every auction is available for just one week. If i convert the string > to date i can easily add one week to the date. During the week for > every goods, clients can input their desired prices.But the new > problems arise, how can I find today's d

[Rails] check for new record?

2010-07-01 Thread badnaam
Is it possible to check if the record that is about to be saved is a brand new record or an update? I am trying to do this inside a before_save callback. I am on rails 2.3.8 Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post

Re: [Rails] How to communicate with Rails App from external C++/C# application using REST?

2010-07-01 Thread Jason Roelofs
On Jul 1, 2010, at 7:31 PM, Gerwin wrote: > Hi, > > I was wondering how to communicate with my web app from e.g. a C++/C# > application. I know how to use the HTTP Rest methods but was wondering > about the following: > > * How to use POST with the authenticity_token (how do I get the > token?)

[Rails] Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-01 Thread cult hero
Oh, and I should add I'm using beta3. On Jul 1, 4:38 pm, Fernando Perez wrote: > cult hero wrote: > > I have kind of an interesting problem. > > No this problem is boring and is known since at least 2008. It just bit > my ass with Rails 2.3.8. > > Here is a beautiful fix:http://redmine.ruby-lang.

[Rails] Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-01 Thread cult hero
It's definitely not mysql related. I'm not using MySQL. I'm using PostgreSQL and I'm using Sequel. All the strings coming from the database are UTF-8. And I saw A LOT about the magic comment, but where do I put it in a template? And there's no way to basically set a "default" magic comment? On Ju

[Rails] Re: How do you deploy RoR? Newb alert!

2010-07-01 Thread Fernando Perez
> I'm just worried I'm going to waste money on an outdated book :) > > Thanks again for your time. > Jeremy The book is overbloat. The author suggests to run your rails setup in a Xen virtual machine! Well he sells rails hosting... Capistrano is not necessary when you know how to use a good scm

[Rails] Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-01 Thread Fernando Perez
cult hero wrote: > I have kind of an interesting problem. No this problem is boring and is known since at least 2008. It just bit my ass with Rails 2.3.8. Here is a beautiful fix: http://redmine.ruby-lang.org/issues/show/1238 I don't know exactly how to fix all this mess. -- Posted via http://

Re: [Rails] Re: How do you deploy RoR? Newb alert!

2010-07-01 Thread Hassan Schroeder
On Thu, Jul 1, 2010 at 3:54 PM, Ali Imran wrote: > I looked for the way to use any thing else other than GIT, because it > is not free Huh? Where did you get that idea? >From the git site: Git is a free & open source, distributed version control system designed to handle everything from sm

[Rails] How to communicate with Rails App from external C++/C# application using REST?

2010-07-01 Thread Gerwin
Hi, I was wondering how to communicate with my web app from e.g. a C++/C# application. I know how to use the HTTP Rest methods but was wondering about the following: * How to use POST with the authenticity_token (how do I get the token?) * How to maintain a session (i.e. login and keep the se

[Rails] Re: Re: list using a sql statement

2010-07-01 Thread RailsFan Radha
thanks Marnen. this is exactly what i as looking for. Your answer is informative and it explains why i should avoid writing sqls in it. thanks again. -radha. Marnen Laibow-Koser wrote: > RailsFan Radha wrote: > [...] >> What is the bext practice in this case? (Yes, I always want to show the >>

[Rails] Q on P331 in SimpleRails2 book

2010-07-01 Thread RailsFan Radha
If anyone has read the book, Sitepoint "Simply Rails 2 " book. then... here is my mind breaking q: Page 331 - Join Model Relationship: He has User Model, Story Model and Votes Model in the sample scenario which he is walking through in this book. User can write many stories. So, User :has

[Rails] Re: How do you deploy RoR? Newb alert!

2010-07-01 Thread Ali Imran
I am also new on Rails, This thread is very helpful. I also started development from windows but when i reached at the point of passenger, than I moved to Linux Ubuntu. I start working with godaddy hosting, but face some problems than i move to site5.com and successfully upload my first demo proje

[Rails] Using Associations vs Child_Model.find

2010-07-01 Thread khagimoto
I have a model (Parent) that has a has_many association with another model (Child). I read that there are performance issues (relating to GC) with too many associations. I was about to add more has_many associations to the parent model to get child objects ordered by different columns like so: (

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-07-01 Thread Jerome Fillioux
Ali Imran wrote: > Yes of course Hello :) can you give me some of your hardware details, such as the laptop model, os version, and so on please ? we want virtualrails to be as little buggy as possible, and if there is a way to solve your problem, we'll try to find it :) -- Posted via http://w

[Rails] Re: Deploy: Developing on Windows Deploying on Linux hosting

2010-07-01 Thread Ali Imran
Yes of course On Jun 22, 11:35 pm, Ali Imran wrote: > Do Now I need to install Ruby on rails on my virtual machine.. > > On Jun 22, 11:09 pm, Ali Imran wrote: > > > here is how... > > >http://www.pendrivelinux.com/running-linux-from-within-windows-virtua... > > > here is iso > > >http://www.linu

Re: [Rails] Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-01 Thread Jeremy Kemper
On Thu, Jul 1, 2010 at 12:09 PM, cult hero wrote: > I have kind of an interesting problem. > > I have a form wherein people enter information. Big surprise. If they > enter any "weird" characters like ø or é or whatever, the form will > submit and all is well. However, I have a select box for the

[Rails] Re: best way to internationalize content from database

2010-07-01 Thread Anderson Leite
Hello Marnen "keep translated strings in PO files " but think about a content management system that users put information about a new protuct in english and portuguese. It's easy to use i18n for labels...but.what about the product description ?? I can't put product description into a PO

[Rails] Re: GIT: How to upload Rails project using GIT

2010-07-01 Thread Ali Imran
Yes you are right, thanks On Jun 30, 3:51 pm, Robert Walker wrote: > Ali Imran wrote: > > i look at the apache config and i set the globaluser name for git but > > it did not work > > I think you've gone completely off-topic at this point. You really need > to take this to an appropriate Git for

[Rails] Date issues

2010-07-01 Thread melomane
Hi everyone. I know that the subject I chose is general, but it is a mixture of problems. I searched a lot in the group, in AWD with Rails book and some forums and found a lot of threads but none of them solved my problem, many of them didn't work at all. The web site manager is going to set a star

[Rails] Re: best way to internationalize content from database

2010-07-01 Thread Marnen Laibow-Koser
Anderson Leite wrote: > Hello all. > > It's ok to internationalize thing at app using rails, but how to deal > with content from database ? > I think that may not be a good approach. I think it's better to keep translated strings in PO files -- that way, you can hand them off to translators.

[Rails] Re: Close Modalpopup with RJS

2010-07-01 Thread Chris Kalaboukis
Chris Kalaboukis wrote: > Chris Habgood wrote: >> Here is something to close modalbox, rjs: >> >> page.call 'Modalbox.hide();' > > Thanks Chris... this is what I get when I try that: > > undefined local variable or method `page' for > # > > any ideas? also tried this: render :update do

[Rails] best way to internationalize content from database

2010-07-01 Thread Anderson Leite
Hello all. It's ok to internationalize thing at app using rails, but how to deal with content from database ? What's the best aproach ? I don't wanna do things like: <% if english %> <%= obj.name_english%> <% else %> <%= obj.name_japanese%> <% end %> The best way is to do all at controll

[Rails] Re: Close Modalpopup with RJS

2010-07-01 Thread Chris Kalaboukis
Chris Habgood wrote: > Here is something to close modalbox, rjs: > > page.call 'Modalbox.hide();' Thanks Chris... this is what I get when I try that: undefined local variable or method `page' for # any ideas? -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] Re: Close Modalpopup with RJS

2010-07-01 Thread Me
Here is something to close modalbox, rjs: page.call 'Modalbox.hide();' On Jul 1, 12:49 pm, Chris Kalaboukis wrote: > hi guys: > > I'm scratching my head on this one: I have a twitter app where I'm > trying to open a modalpopup with a twitter sign in, get them to sign in, > then close the popup a

Re: [Rails] Re: can I access session variable in model

2010-07-01 Thread Anand Ramanathan
I tried passing the session id around to the model, and agree that it is very ugly. I am curious to know how you can best achieve this scenario without passing in the session variable: abort a delayed_job (or other model based) work item when user changes something - this is mainly required becaus

[Rails] Re: Insert data into a database without user input

2010-07-01 Thread Jack Deadcore
Craig White wrote: > On Thu, 2010-07-01 at 21:23 +0200, Jack Fall wrote: >> >> else >> format.html { render :action => "new" } >> format.xml { render :xml => @post.errors, :status => >> :unprocessable_entity } >> end >> end >> end >> > > def create > @pos

[Rails] Re: Insert data into a database without user input

2010-07-01 Thread Robert Walker
Jack Deadcore wrote: > Hello there, > I am new around here and have been looking over the internet for a > solution but can't find one. I am fair new to rails but have a decent > understanding of it to get by and a few years experience behind me. > My problem is that I try to insert data in a datab

Re: [Rails] Insert data into a database without user input

2010-07-01 Thread Craig White
On Thu, 2010-07-01 at 21:23 +0200, Jack Fall wrote: > Hello there, > I am new around here and have been looking over the internet for a > solution but can't find one. I am fair new to rails but have a decent > understanding of it to get by and a few years experience behind me. > My problem is that

[Rails] Insert data into a database without user input

2010-07-01 Thread Jack Fall
Hello there, I am new around here and have been looking over the internet for a solution but can't find one. I am fair new to rails but have a decent understanding of it to get by and a few years experience behind me. My problem is that I try to insert data in a database and it does not come up. Th

[Rails] Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-01 Thread cult hero
I have kind of an interesting problem. I have a form wherein people enter information. Big surprise. If they enter any "weird" characters like ø or é or whatever, the form will submit and all is well. However, I have a select box for the state which, if you're looking at Spain, has states like A C

[Rails] Close Modalpopup with RJS

2010-07-01 Thread Chris Kalaboukis
hi guys: I'm scratching my head on this one: I have a twitter app where I'm trying to open a modalpopup with a twitter sign in, get them to sign in, then close the popup and refresh the main window. My code however refreshes the main window with the popup window result, which I thought was really

Re: [Rails] Re: Ruby on Rails - RHEL

2010-07-01 Thread Leonardo Mateo
On Thu, Jul 1, 2010 at 12:45 PM, Marnen Laibow-Koser wrote: > Leonardo Mateo wrote: >> On Thu, Jul 1, 2010 at 5:10 AM, Gabor Antal >> wrote: >>> >>> >>> But since this, I have no idea how can I install the rake, rail, etc. >>> packages with gem from local files because the firewalls do not allowe

[Rails] Re: Re: list using a sql statement

2010-07-01 Thread Marnen Laibow-Koser
RailsFan Radha wrote: [...] > What is the bext practice in this case? (Yes, I always want to show the > active records only ). > Using find_by_sql or using a condition in the find :all ? ( I like SQLs, > but as far as the performance goes which approach is better? ) The performance is probably

[Rails] Re: Re: list using a sql statement

2010-07-01 Thread RailsFan Radha
An update to this post: Here, i'm trying to figure out which is the better approach or best practice to show only active categories records from the category table. Also, i want to prevent any SQL injection. Do u think, using find_by_sql approach could protect the page from sql injection to vi

[Rails] Re: Ruby on Rails - RHEL

2010-07-01 Thread Marnen Laibow-Koser
Leonardo Mateo wrote: > On Thu, Jul 1, 2010 at 5:10 AM, Gabor Antal > wrote: >> >> >> But since this, I have no idea how can I install the rake, rail, etc. >> packages with gem from local files because the firewalls do not allowe >> me public internet connection in this host. >> >> Can you help m

[Rails] Re: Booleans on new records.

2010-07-01 Thread Pale Horse
As I have said, I've realised the problem is not with the controller code that's under discussion but with a lib file that takes precedence over it. Conversing more on the matter would be an exercise in futility, however. That said, Marnen & Robert, I will read that Wiki and have absorbed what y

[Rails] Re: Re: list using a sql statement

2010-07-01 Thread RailsFan Radha
Colin Law wrote: > On 29 June 2010 03:19, RailsFan Radha wrote: >>> >>> � def list >> >> �def self.find_active_categories >> � � �find_by_sql("SELECT * from category >> � � � � � where status = 'A') >> � � �order by category_id ") >> �end > > Don't use find_by_sql unless absolutely necessary.

[Rails] Re: Using a database record as a Find condition

2010-07-01 Thread Marnen Laibow-Koser
the batman wrote: > I have a photos model which has a field for a gallery title, I have a > gallery controller which currently shows all photos that don't have an > empty gallery title field. This is an unnormalized schema, since the gallery title repeats in each record that belongs to the same g

[Rails] Re: Booleans on new records.

2010-07-01 Thread Marnen Laibow-Koser
Pale Horse wrote: > Robert Walker wrote: >> Pale Horse wrote: >>> My controller code can be seen here: >>> >>> http://pastie.org/1026480 >> >> Oh, where to begin. Unless I'm completely daft, I see only one single >> line in your new method that belongs in a "new" action. I don't have a lot to s

[Rails] Using a database record as a Find condition

2010-07-01 Thread the batman
I have a photos model which has a field for a gallery title, I have a gallery controller which currently shows all photos that don't have an empty gallery title field. I want to have on my gallery page a photo from each gallery that has a unique title, which would link to 'gallery/gallery-title',

[Rails] Re: Booleans on new records.

2010-07-01 Thread Pale Horse
Robert Walker wrote: > Pale Horse wrote: >> My controller code can be seen here: >> >> http://pastie.org/1026480 > > Oh, where to begin. Unless I'm completely daft, I see only one single > line in your new method that belongs in a "new" action. I can't argue with that but this is not my site. F

[Rails] Re: Booleans on new records.

2010-07-01 Thread Robert Walker
Pale Horse wrote: > My controller code can be seen here: > > http://pastie.org/1026480 Oh, where to begin. Unless I'm completely daft, I see only one single line in your new method that belongs in a "new" action. This one: @project = Project.new Compare your method with what a new method shoul

[Rails] Re: Rails3 rails console throws error

2010-07-01 Thread Aslam Syed
Kenneth     wrote: > This error means you did not have the required dependencies to install > readline during installation of ruby. If you can find the location of > the ruby source files in your system, you can go to the ext/readline > folder. In there there should be an extconf.rb which you ca

[Rails] Re: Re: link_to underlying urls/paths are showing in the actual view

2010-07-01 Thread Matt Royer
Thanks for the tips Colin and Anand... Neither corrected the issue. I'm going to see if I can do this from another system. I'm wondering if my installation is jacked up or something. I'll post again and let everyone know what i've found. I'm on my system at work, so am limited by what I can do.

Re: [Rails] Re: need help with validation, toggle, checkbox etc...

2010-07-01 Thread tom
ok thx On Wed, Jun 30, 2010 at 8:59 PM, Me wrote: > You need to add condition, where if a box is checked show div. > > On Jun 30, 7:11 pm, tom wrote: > > hi, > > im gettin lost with the subject. need some pointers: > > > > Usermodel: > > validates_presence_of :companyname, :if => :i

Re: [Rails] which one i choose .net or ror

2010-07-01 Thread shyam mohan
hi... U learned ror 3 month ... i think u also have a knowledge in .NET compare it ...by itself Ror is the programmers haven ... programmer's life here is so cool ... I hope the first page in ror book is it's ... benefits and virtues... still u asking ... questions... -Shyam On Thu, Jul

Re: [Rails] which one i choose .net or ror

2010-07-01 Thread Leonardo Mateo
On Thu, Jul 1, 2010 at 2:43 AM, Jason Michael wrote: > So switch, and do it quickly! +1 > > On Thu, Jul 1, 2010 at 12:40 AM, palani wrote: >> which one i choose .net or ror >> >> i'm kumar from chennai.now i'm working as a ruby on rails programmer >> (3 months experience). >> now i want to switc

Re: [Rails] Ruby on Rails - RHEL

2010-07-01 Thread Leonardo Mateo
On Thu, Jul 1, 2010 at 5:10 AM, Gabor Antal wrote: > Hi, > > I am fighting to install Redmine therefore I need to install Ruby on > Rails to a machine behind many firewalls. OS is RHEL. > > My idea was to download the packages, make and install... > > There was some difficulties because the latest

Re: [Rails] hi. !--s

2010-07-01 Thread lucas franceschi
yeah that would be a great idea... though in brazil there's no spam's to eat. i guess i just had a new dream. *someday, I'll eat spam's*. Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 On Thu, Jul 1, 2010 at 8:02 AM, Colin Law wrote:

[Rails] Re: Rails3 rails console throws error

2010-07-01 Thread Kenneth Eunjung
This error means you did not have the required dependencies to install readline during installation of ruby. If you can find the location of the ruby source files in your system, you can go to the ext/readline folder. In there there should be an extconf.rb which you can run with ruby extconf.rb

[Rails] Problem with uniq option in has_many_polymorphs

2010-07-01 Thread Max Williams
hi all I have a has_many_polymorphs relationship that involves the following classes: class DigilearningModule < ActiveRecord::Base has_many_polymorphs :members, :from => [:digilearning_titles, :lesson_categories, :lesson_category_groups], :through => :digilearning_module_memberships,

[Rails] Rails3 rails console throws error

2010-07-01 Thread Aslam Syed
Hi, I am trying Rails 3 and I am using RVM to manage the ruby versions. Using RVM I had installed ruby versions 1.8.7, 1.9.1 and 1.9.2 When I do "rails console" I am getting the following error and console isn't starting: http://www.pastie.org/1026503 Since I dont require 1.9.1 any more to work

[Rails] Booleans on new records.

2010-07-01 Thread Pale Horse
I have a array of Projects, which contains all Projects that have their 'display' object set to 1 (true). The problem is: when I create a new record, I tried changing the value of 'display' to false. This did not change the value as false when it entered the database. In contrast to this, when I e

Re: [Rails] hi. !--s

2010-07-01 Thread Colin Law
On 1 July 2010 11:38, lucas franceschi wrote: > omg, now spams are coming to groups? > I'm afraid we'll soon need to start checking our microwaves for spam too.. Don't forget to take it out of the can or it will wreck the microwave Colin > > > Sempre Alerta Para Servir, > > Lucas Franceschi > E

[Rails] Re: cannot install Mongrel gem w ruby-1.9.2-preview3 [ x86_64 ] and Rails 3.0.0.beta4 [OS X 10.6.4]

2010-07-01 Thread Syed Aslam
I had problem even though I had installed mongrel --pre. In Gemfile you need to specifically point mongrel to use "1.2.0.pre2" or else it will try to use the old version, even if you remove it from the cache. On Jun 20, 2:22 pm, Anthony Green wrote: > More digging and the answer is to install m

[Rails] Re: cannot install Mongrel gem w ruby-1.9.2-preview3 [ x86_64 ] and Rails 3.0.0.beta4 [OS X 10.6.4]

2010-07-01 Thread Syed Aslam
I had problem even though I had installed mongrel --pre. In Gemfile you need to specifically point mongrel to use "1.2.0.pre2" or else it will try to use the old version, even if you remove it from the cache. On Jun 20, 2:22 pm, Anthony Green wrote: > More digging and the answer is to install m

Re: [Rails] hi. !--s

2010-07-01 Thread lucas franceschi
omg, now spams are coming to groups? I'm afraid we'll soon need to start checking our microwaves for spam too.. Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 On Thu, Jul 1, 2010 at 6:53 AM, Sridhar Golyandla wrote: > Hi,, > I find

[Rails] hi. !--s

2010-07-01 Thread Sridhar Golyandla
Hi,, I find a good website, I would like to introduce it to you,It will give you big surprise:excellent products,high quality, competitive price. If you are free, please visit it: http://icbcshop12.info . have a nice day! 7--7 -- You received this message because you are subscribed to the

[Rails] Re: Re: Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Neil Bye
Neil Bye wrote: > >> I suggested that in the link_to it should be >> :id => @story_id >> which provides the value (2 in the case you showed), not >> :id => "@story_id" >> which provides a string "@story_id" >> >> I think you need to go through some basic ruby tutorials if that does >> not make se

[Rails] Re: Re: Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Neil Bye
> I suggested that in the link_to it should be > :id => @story_id > which provides the value (2 in the case you showed), not > :id => "@story_id" > which provides a string "@story_id" > > I think you need to go through some basic ruby tutorials if that does > not make sense. > > Colin <%= link_

Re: [Rails] Re: Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Colin Law
On 1 July 2010 10:01, Neil Bye wrote: > >> >> You should have been able to work it out from this, it is getting the >> string @story_id instead of 2 >> >> Colin > > How can I make it take 2 without using @story.id to find it. If I move > to story 3 it has to send 3. How does it know to do so? Sorr

[Rails] Re: Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Neil Bye
> > You should have been able to work it out from this, it is getting the > string @story_id instead of 2 > > Colin How can I make it take 2 without using @story.id to find it. If I move to story 3 it has to send 3. How does it know to do so? Sorry I just can't get it. -- Posted via http://www

[Rails] Creating similar but non-identical pages?

2010-07-01 Thread Isak
Our app has two user models, User and Admin, each with their own non- overlapping UI. Users have a reasonably simple crud page, let's call it "foods", and we want to add "foods template" functionality to the admin ui. Basically reusing the food model, but with a blank user_id FK, as default data

Re: [Rails] Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Colin Law
On 1 July 2010 09:41, Neil Bye wrote: > Colin Law wrote: >> On 30 June 2010 23:45, Neil Bye wrote: @story.id? �You could just display it on the page >>> >  You can >> also look at the html of the page (view page source in browser) to >> check that the id is there in the href. >> >> Add code

[Rails] Re: Re: Re: Re: problem finding find current page

2010-07-01 Thread Neil Bye
Colin Law wrote: > On 30 June 2010 23:45, Neil Bye wrote: >>> @story.id? �You could just display it on the page >> You can > also look at the html of the page (view page source in browser) to > check that the id is there in the href. > > Add code to show the id on the page and check that it als

[Rails] Ruby on Rails - RHEL

2010-07-01 Thread Gabor Antal
Hi, I am fighting to install Redmine therefore I need to install Ruby on Rails to a machine behind many firewalls. OS is RHEL. My idea was to download the packages, make and install... There was some difficulties because the latest Ruby in the RHEL repo was not modern enough for gem. So I donwlo