[Rails] Help with nested form: User and Artist

2010-10-15 Thread Christian Fazzini
Artist is 1:1 with User. User has_one :artist In my artist model, I have: belongs_to :user accepts_nested_attributes_for :user However, in my artist _form, the name column from the user model does not display. I am doing: % f.fields_for :user do |builder| % p class=fields %=

[Rails] Re: File links with wildcards(?)

2010-10-15 Thread Brandon P.
Robert Walker wrote in post #950275: Take a look at the Dir class (especially Dir.glob()/ Dir[]. methods). http://www.ruby-doc.org/core/classes/Dir.html Thanks a lot, Robert! Dir.glob() is just what I needed. Now I just have to figure out the best way to implement it. -- Posted via

Re: [Rails] has_many :through - creating a new model

2010-10-15 Thread Erol Fornoles
Whipped up a small plugin for your use case: http://github.com/Erol/nested_checklist In your Venue model: has_many :assignments has_many :sheets, :through = :assignments accepts_nested_checklist_and_attributes_for :sheets In your VenuesController: def new @venue = Venue.new

[Rails] Populate f.select from database

2010-10-15 Thread David
I am fairly new to RoR and I have encountered something that I was unable to figure out by searching google or the API resource Basically I would like to populate a select drop down box on a form with values that have been created on another model. I am trying to make a form to create a new

[Rails] (JOBS) Senior Software Engineer (Ruby on Rai ls) / CTO – Health 2.0 Startup

2010-10-15 Thread Bchik
Job opportunity in San Francisco (but telecommuters may be considered). Feel free to forward to anyone you think might be interested. = We are San Francisco based, consumer-focused web startup currently in stealth mode that is focused on a large but underserved medical

[Rails] Techlive - IT War Room in The Cloud

2010-10-15 Thread TechLive Admin
In order to serve community, we have built a cloud application using Ruby Java that is intended to help IT folks who make a living on managing and resolving problems. It's a virtual War Room for IT troubleshooting. We would love to have some feedback from users in specialist group like this.

[Rails] SQL Restore and Migrations

2010-10-15 Thread Ben
I had a lot of data in my db that I did not put in my migration files. About 1.5 Million records. So I dumped into an sql file and restored on the production server. My site is up and running (heavyhead.net) but how do I tell Rails that my db is already migrated so I can still use migrations to

[Rails] Struggling with a complex Rails 3 query (user.friends.checkins)

2010-10-15 Thread Matt Hodan
I'm working on a social networking application and am trying to build a complex query that efficiently pulls all of a users' friends' checkins from the database. Basically I need: user.friends.checkins I've recreated (in simplified form) the data structure below for reference and included

[Rails] Re: Adding foreign key when creating new user

2010-10-15 Thread Matt Slay
Does using a hidden fields on a form allow for the possibility of someone spoofing the data in the hidden fields that are posted back? For instance, I have parent-child structure where I call new_project_task(@project) which hits the tasks controller create action, and on the page I do not want

[Rails] how to list all sessions?

2010-10-15 Thread punund
I have created ActiveRecord session store in a rails 3 project: rake db:sessions:create rake db:migrate then Myapp::Application.config.session_store :active_record_store, :key = '_myapp_session' in initializers/session_store.rb and it all works. Now the question: how do I list ALL active

[Rails] hai

2010-10-15 Thread jeni
I Need to know the basic of the ruby on rails and how to write a program on it.if u send a quick reply it will very useful -- 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

[Rails] Re: SQL Restore and Migrations

2010-10-15 Thread Frederick Cheung
On Oct 15, 2:22 am, Ben ben.ka...@gmail.com wrote: I had a lot of data in my db that I did not put in my migration files.  About 1.5 Million records.  So I dumped into an sql file and restored on the production server.  My site is up and running (heavyhead.net) but how do I tell Rails that

[Rails] Learning by example

2010-10-15 Thread Gady Sujo
Hi, I want to get into rails. i learn the best by seeing a built app and watching how it was written. where can i find typical open source rails project that i can download and learn from ? i'm interested in facebook connect integration tag clouds, searching in my website Thanks! -- Posted via

[Rails] Re: how to list all sessions?

2010-10-15 Thread Frederick Cheung
On Oct 15, 7:49 am, punund i...@vo.id.lv wrote: I have created ActiveRecord session store in a rails 3 project: rake db:sessions:create rake db:migrate then Myapp::Application.config.session_store :active_record_store, :key = '_myapp_session' in initializers/session_store.rb and it

[Rails] Re: Populate f.select from database

2010-10-15 Thread Frederick Cheung
On Oct 14, 6:50 pm, David da...@layer2computers.com wrote: Can someone please help me come up with the code to make this drop down box dynamically populated from the vendor table? I want the drop down box to contain the vendor.name and also have the id each of the vendors. Any help in the

[Rails] Re: ActionMailer multipart messages with attachment rails3

2010-10-15 Thread Thomas Grebschrop
Thomas Grebschrop wrote in post #950122: Hi, I try to send a multipart message with actionmailer under rails3. When the mail client receives the mail the attachment is empty. I do definitely attach a non-empty file. Here is the code: snip recipients [sec...@secret.com] from

RE: [Rails] hai

2010-10-15 Thread Adrian Wadey
-Original Message- From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-t...@googlegroups.com] On Behalf Of jeni Sent: 15 October 2010 06:44 To: Ruby on Rails: Talk Subject: [Rails] hai I Need to know the basic of the ruby on rails and how to write a program on it.if u send a

Re: [Rails] hai

2010-10-15 Thread clanlaw
On 15 October 2010 06:44, jeni lithwin.jeni...@gmail.com wrote:  I Need to know the basic of the ruby on rails and how to write a program on it.if u send a quick reply it will very useful Have a look at the Rails Guides, http://guides.rubyonrails.org/ Colin -- You received this message

[Rails] Re: how to list all sessions?

2010-10-15 Thread punund
On Oct 15, 10:21 am, Frederick Cheung frederick.che...@gmail.com wrote: On Oct 15, 7:49 am, punund i...@vo.id.lv wrote: I have created ActiveRecord session store in a rails 3 project: rake db:sessions:create rake db:migrate then Myapp::Application.config.session_store

Re: [Rails] Digest for rubyonrails-talk@googlegroups.com - 25 Messages in 17 Topics

2010-10-15 Thread lithwin jenifer
can u send a program of how to create a rails controller and rails view in rails -- 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 unsubscribe from this group, send

[Rails] Re: Help with nested form: User and Artist

2010-10-15 Thread Christian Fazzini
Just figured out that it needed to be: %= f.fields_for :user do |builder| % with the %=. Strange why this is not in the docs On Oct 15, 2:29 pm, Christian Fazzini christian.fazz...@gmail.com wrote: Artist is 1:1 with User. User has_one :artist In my artist model, I have:   belongs_to

[Rails] Re: has_many :through - creating a new model

2010-10-15 Thread José Mota
I'll go test it and let you know, Erol. Thanks for the kind help. -- 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 unsubscribe from this group, send email to

[Rails] insert image in a pdf

2010-10-15 Thread Premanshu Mishra
Hi Railers, How to insert an image saved at C:/Rails/asd.jpg into a pdf I tried logo = #C:/Rails/asd.jpg pdf.image logo It is giving me an error: image file is an unrecognised format may the railers throw some light to help me!! Premanshu -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Fat free CRM error

2010-10-15 Thread ouikoto ouikoto
Good day gurus I was trying this fat free crm I was trying now to run the server it gives me an error ruby.exe- entry point not found The procedure entry point sqlite3_column_database_name could not be located in the dynamic link library sqlite3.dll I have this versions of instant rails

[Rails] Re: Beginner cant get rake to work

2010-10-15 Thread Jon W.
Okay that fixed the dependicies for the shell, seems like there is something wrong with the gem though. When i try to use rake from my IDE it searches for the gem and it fails. Well I can work around it. Thank you -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] Re: has_many :through - creating a new model

2010-10-15 Thread Erol Fornoles
Hmmm okay looks like it's bugged when the controller action is edit. Give me a few to fix this. On Fri, Oct 15, 2010 at 4:31 PM, José Mota josemota@gmail.com wrote: I'll go test it and let you know, Erol. Thanks for the kind help. -- You received this message because you are subscribed

[Rails] Re: Learning by example

2010-10-15 Thread Sunny Ezror
http://railscasts.com http://teachmetocode.com http://railstutorial.org -sunny http://ezror.com -- 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

[Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread Sunny Ezror
This should all the info you need:http://www.modrails.com/documentation/Users%20guide%20Apache.html Here's what I've running on my local development: LoadModule passenger_module /home/.rvm/gems/ruby-1.8.7-p249/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot

[Rails] Re: hai

2010-10-15 Thread Sunny Ezror
http://railscasts.com/ http://teachmetocode.com/ http://railstutorial.org/ -sunny http://ezror.com jeni wrote in post #950364: I Need to know the basic of the ruby on rails and how to write a program on it.if u send a quick reply it will very useful -- Posted via http://www.ruby-forum.com/.

Re: [Rails] Re: has_many :through - creating a new model

2010-10-15 Thread Erol Fornoles
Commited possible fix. Just pull the updates. On Fri, Oct 15, 2010 at 4:49 PM, Erol Fornoles erol.forno...@gmail.comwrote: Hmmm okay looks like it's bugged when the controller action is edit. Give me a few to fix this. -- Erol M. Fornoles http://github.com/Erol

[Rails] What's the best open source Rails Facebooker project to learn from?

2010-10-15 Thread Gady Sujo
Hi, I'm creating social network app that integrates with Facebook connect. I'm looking for an open source Facebooker or facebooker2 project that i can look at the code and learn from. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Confused about ruby-ole gem

2010-10-15 Thread Max Williams
Hi all. I'm having an issue with the ruby-ole gem, which is a dependency of the spreadsheet gem i installed. I'm trying to unpack it into my vendor/gems folder. I have this line in my environment.rb config.gem ruby-ole, :version = '1.2.10.1', :lib = ole and then do rake gems:unpack. It

[Rails] “ undefined method `enumerable_enumerator_ path' error.

2010-10-15 Thread Maay A.
I'm using basic scaffold structure. What I need, is to add 'moderate' action and view by changing published to true. In my idea, on moderate.html I should get the list of all unpublished entries with the ability to change and save their parameters. Here are parts of my code: #names_controller.rb

[Rails] Rails 2 to Rails 3 upgrade issues

2010-10-15 Thread David Weldon
Hi All, I'm very new to RoR development and am working through the developer.apple.com tutorials to try to get a good enough working knowledge to be able to start my own project. Unfortunately, i'm using Rails 3 and the tutorials are aimed at a Rails 2 environment. I've been able to get a fair

[Rails] Not Null

2010-10-15 Thread PalaniKannan K
hi, I tried to find the not null elements from database @genus_counts = Table.count(:all, :conditions= {:col1 = params[:gm], :col2 = nil}, :without = {:col3 = nil}) its not recognising without function. and @genus_counts = Table.count(:all, :conditions= {:col1 = params[:gm], :col3 != nil

[Rails] Re: Rails 2 to Rails 3 upgrade issues

2010-10-15 Thread AppleII717
On Oct 15, 6:12 am, David Weldon li...@ruby-forum.com wrote: I'd be very grateful if anyone could offer some advice. Apologies if the source code is too long for the forum. if the rails.js file in public/javascripts? Is it being loaded? That is the file that :remote = true is going to try

[Rails] ActiveRecord::Relation issue

2010-10-15 Thread Max Reznichenko
Hi, everyone. Yesterday found an interesting issue in scope method. Let`s say, you have next model structure: Model A --has_many- Model B --has_many- Model C --has_many- Model_D Model D has some attribute, let`s say, 'status' ENUM('opened', 'closed'). In Model A I would like to take all

[Rails] Re: Fat free CRM error

2010-10-15 Thread David
Have you installed the required gems on the server? On Oct 15, 4:41 am, ouikoto ouikoto li...@ruby-forum.com wrote: Good day gurus I was trying this fat free crm I was trying now to run the server it gives me an error ruby.exe- entry point not found The procedure entry point

Re: [Rails] Geo-locations, Countries, Zips, Cities

2010-10-15 Thread señor tower
Thanks Philip. Anyone, any other recommendations? On Fri, Oct 15, 2010 at 12:20 AM, Philip Hallstrom phi...@pjkh.com wrote: I am helping on a project and we need db data for geo-locations, lon, lat, countries and zipcodes... Is there anything out there you guys recommend? I've used

[Rails] Re: Geo-locations, Countries, Zips, Cities

2010-10-15 Thread Frederick Cheung
On Oct 15, 12:44 pm, señor tower senortow...@gmail.com wrote: Thanks Philip. Anyone, any other recommendations? For the US http://www.census.gov/geo/www/tiger/ has loads of data. Fred On Fri, Oct 15, 2010 at 12:20 AM, Philip Hallstrom phi...@pjkh.com wrote: I am helping on a project

[Rails] Different behaviors for same rack stack in development and production environment

2010-10-15 Thread thierry henrio
Hello ! I had to deploy a rails 3 app on heroku app is using bare sass, and it is already known as a hassle ( http://blog.heroku.com/archives/2009/8/18/heroku_sass/) so I looked for what was said on web, and decided to offer serve sassed css from tmp dir, using Rack::Static, as first option

[Rails] LDAP AUTHENTICATION WITH AUTHLOGIC

2010-10-15 Thread saranya
Hi all Plz suggest simple articles,blog to implement ldap authentication using authlogic plugin in ror Thxs in advance -- 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

[Rails] Re: “ undefined method `enumerable_enumera tor_path' error.

2010-10-15 Thread maay
I'm steel looking for an answer or suggestion. -- 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 unsubscribe from this group, send email to

[Rails] Re: Fat free CRM error

2010-10-15 Thread ouikoto ouikoto
David Furber wrote in post #950429: Have you installed the required gems on the server? I think I found out that the database.yml was renamed and after running again the script server. I got another error again sir. C:\InstantRails-2.2-win\rails_apps\crm2ruby script/server = Booting Mongrel

[Rails] Re: “ undefined method `enumerable_enumera tor_path' error.

2010-10-15 Thread Frederick Cheung
On Oct 15, 11:54 am, Maay A. li...@ruby-forum.com wrote: I'm using basic scaffold structure. What I need, is to add 'moderate' action and view by changing published to true. In my idea, on moderate.html I should get the list of all unpublished entries with the ability to change and save

[Rails] Regular Expression

2010-10-15 Thread PalaniKannan K
Dear All, I need to apply a regular expression in html.erb % taxon_name.strains.each do |strain| % % taxon_name.strain_appendices.each_with_index do |strain_appendice, i| % *% if ((strain_appendice.data_source =~ /LPSN/) (strain.relevance =~ /^ty(.*)ain$/))%* % if i == 0 % p%=

Re: [Rails] Techlive - IT War Room in The Cloud

2010-10-15 Thread Joshua Martin
This is a pretty cool system.. I wonder if it would be possible to integrate with Bug/Issues from other other systems.. Maybe, make an API that would let me connect my own Bug Tracking system to this system? Some really cool ideas here (not necessarily original, but that doesn't matter.. you

[Rails] Noughts and Crosses layout with a variable number of entries

2010-10-15 Thread Pale Horse
I have a product listing of 9 per-page. The products on the far right and bottom row should NOT have a border on the aforementioned sides. So, similar to a noughts and crosses layout. However, pages do not always have 9 products to display. You may have a better understanding if you see the code

[Rails] Re: ActiveRecord::Relation issue

2010-10-15 Thread AppleII717
I guess I have to chalk to up to another I didn't know you could do that. I'll also admit I have no idea how efficient this is. I've used a technique where I query a belongs_to table with the ids of a has_many related table. In my test I have Assessments has_many - Questions has_many -

[Rails] packers and movers

2010-10-15 Thread Aggarwal Packers and movers
Aggarwal movers proivide best services in packers and movers like packers and movers Delhi, packers and movers Noida, packers and movers Hyderbad, packers and movers Ahemadabad and many more place. http://www.aggarwalmovers.com/ -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Noughts and Crosses layout with a variable number of entries

2010-10-15 Thread Felix Schäfer
Am 15.10.2010 um 15:03 schrieb Pale Horse: I have a product listing of 9 per-page. The products on the far right and bottom row should NOT have a border on the aforementioned sides. So, similar to a noughts and crosses layout. However, pages do not always have 9 products to display. You

[Rails] Re: ActiveRecord::Relation issue

2010-10-15 Thread AppleII717
Someone else will have to chime in on how efficient or inefficient this is. My last project was on a database that was very reliant on sets and this is the closest thing I've found in rails to that concept. Just To clarify the last statement, the Database environment was 4D and in 4D you'd

Re: [Rails] Re: Selecting only a subset of columns.

2010-10-15 Thread Jarl Friis
Jarl Friis j...@gavia.dk writes: Thanks Xuan and Colin for your attention. Xuan xua...@gmail.com writes: You may try adding a default_scope :select='id, name, etc' to your model. This would accomplish what you are looking for, That was exactly what I was looking for. My actual

[Rails] Changing one item in database without invoking another view than index

2010-10-15 Thread Gandalf Graubart
Hi, I am new to rails, well, sure you will notice that given my question ;) Starting from a simple application for demonstration, just one table with name, status and all the generated scaffold around. Index page with the links to new/edit/delete and all the rest. I do understand the way edit

[Rails] Re: Rails 2 to Rails 3 upgrade issues

2010-10-15 Thread David Weldon
Thanks for the quick response, Steve. The rails.js file is in the public/javascripts and it can be seen in the source of my page: script src=/javascripts/rails.js?1285525822 type=text/javascript/script The link that is generated by the call to link_to is: a

Re: [Rails] Changing one item in database without invoking another view than index

2010-10-15 Thread Walter Lee Davis
Off the top of my head, you could do this: 1. Make a new controller method that changes status. 2. Include whatever checks you need for the authority to make this change (is the change being made to the current user, or does the current user have the privilege to change another user). 3. At

[Rails] Problem on Firefox and :disable_with on remote forms (ajax) when using jQuery

2010-10-15 Thread meefs...@googlemail.com
Hi, I'm not sure if I found a bug, or if I'm doing something wrong. Here is what happens: We're using Rails 3.0.1 with jQuery instead of Prototype. When we create a simple ajax form (using :remote = true) and use :disable_with on the submit button, it works. As a result of the Ajax call we use

[Rails] Re: params function not working

2010-10-15 Thread dbkbali
On Oct 15, 3:43 am, radhames brito rbri...@gmail.com wrote: I mean that you're apparently using it as a repeated pattern.  I think it's an antipattern -- something that looks like a good design pattern at first, but is in fact to be avoided. Marnen, As someone who is a relative rails

[Rails] observe_field for dynamic tables

2010-10-15 Thread Reza Adinata
Hi all, I need to create a very simple dynamic table. I am trying to use observe_field for dynamically update select box (so when I click a menu, there will be generated a submenu according to what I have clicked). Attached are my codes (getsubcategories,index, and controller). I followed this

Re: [Rails] Re: params function not working

2010-10-15 Thread Walter Lee Davis
On Oct 15, 2010, at 10:15 AM, dbkbali wrote: From your extensive knowledge would there be any design or performance advantage in refactoring so that the browser requests a pure html partial only? I am guessing here what Marnen's intention was, but I believe he was saying that the browser

[Rails] Re: Rails 2 to Rails 3 upgrade issues

2010-10-15 Thread AppleII717
The standard delete link created by scaffold is %= link_to 'Destroy', question, :confirm = 'Are you sure?', :method = :delete % There is no reference to remote. Delete is not an ajax call, it is just a javascript call that hides all the build a delete form stuff that happened in Rails

Re: [Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread Hassan Schroeder
On Fri, Oct 15, 2010 at 2:04 AM, Sunny Ezror li...@ruby-forum.com wrote: This should all the info you need:http://www.modrails.com/documentation/Users%20guide%20Apache.html I've looked through that document already, and I don't see anything at all about configuration directives to *build*

[Rails] rspec-rails-2.0.1 is released!

2010-10-15 Thread David Chelimsky
The rails-3.0.1 release excluded a change that I had naively expected to be included. This upgrade is only necessary if you write view specs and are upgrading to rails-3.0.1. To upgrade, all you need to do is change your Gemfile to read: gem rspec-rails, 2.0.1 And then run bundle

Re: [Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread Walter Lee Davis
In my experience, adding passenger to a working apache is trivial, as in sudo gem install passenger and follow the one screen of instructions that follow the compile step. Installing Apache itself is a fairly well-worn path, and should be as simple as [your package manager here] apache2,

[Rails] Re: Not Null

2010-10-15 Thread PalaniKannan K
Dear All, @genus_count = Table.count(:all, :conditions = ['col3 is not null and col2 is null and col1 = ?', params[:gm]) %= @genus_count % It works. -- With Regards, Palani Kannan. K, -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

Re: [Rails] Re: Not Null

2010-10-15 Thread Walter Lee Davis
On which database(s)? This is something I have wrestled with before on SQLite deploying to MySQL. What works on one fails on the other, and vice-versa. Walter On Oct 15, 2010, at 10:46 AM, PalaniKannan K wrote: Dear All, @genus_count = Table.count(:all, :conditions = ['col3 is not null

[Rails] Re: Re: Re: Find account name

2010-10-15 Thread Leonel *.*
So you mean doing something like this in the application controller? def current_user User.find_by_id(session[:user_id]) end That's usually sensible. Since current_user is defined in ApplicationController, and since all your other controllers inherit from ApplicationController,

[Rails] Re: Noughts and Crosses layout with a variable number of entries

2010-10-15 Thread Pale Horse
Apologies for omitting the code you provided - I needed to reduce the number of quoted lines. Thanks very much, I'll give that a try. I should've considered the in_groups_of method before. I've actually hacked something together that seems to have worked. I'll report back with my results. --

[Rails] Re: Noughts and Crosses layout with a variable number of entries

2010-10-15 Thread Ar Chron
Pale Horse wrote in post #951715: Apologies for omitting the code you provided - I needed to reduce the number of quoted lines. Thanks very much, I'll give that a try. I should've considered the in_groups_of method before. Bah, my last_col_pos calc is wrong... rather than group.length-1,

Re: [Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread Hassan Schroeder
On Fri, Oct 15, 2010 at 7:41 AM, Walter Lee Davis wa...@wdstudio.com wrote: In my experience, adding passenger to a working apache is trivial, as in sudo gem install passenger and follow the one screen of instructions that follow the compile step. Installing Apache itself is a fairly well-worn

Re: [Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread Walter Lee Davis
I don't believe there is any specific recipe that favors passenger. Your Apache 2 should be set to allow dynamic libraries (DSOs) and really that's the only thing that could possibly flummox this as far as I know. I have installed Passenger on a Ubuntu server and a Mac OS X Server 10.5. In

[Rails] Newbie - Rails 3 lightbox?

2010-10-15 Thread Anders_P
Hello! I'm trying to create a simple image popup effect using Lightbox2, http://www.huddletogether.com/projects/lightbox2/. But I don't get it to work. My code looks lite this: span class=ad_image a href=%= ad.image.url(:thumb) % rel=lightboximg src=%= ad.image.url(:thumb) % //a /span This

[Rails] multiple domain names mapping to different rails app URLs

2010-10-15 Thread bingo bob
OK, I'm really confused as to how this might work/if it's possible or even if I'm thinking about it right, so I'll just explain what I'd like to do and you can shoot holes in it. I have an app running that is for properties. Each property has it's own website within my app and a user can tweak

Re: [Rails] Newbie - Rails 3 lightbox?

2010-10-15 Thread Walter Lee Davis
I think Lightbox2 uses the classname rather than the rel for the initial hook. Rel is used for a lot of other stuff like geometry and format, but classname does the initial hookup. Walter On Oct 15, 2010, at 11:24 AM, Anders_P wrote: Hello! I'm trying to create a simple image popup

[Rails] has already been taken on empty field

2010-10-15 Thread Leonel *.*
I have a form to add clients and enter their email. The email is not required but should be unique, so I have this at the model. CLIENT validates :email, :uniqueness = true Some clients have NO email on record. So when I try to add a second client with no email, I get this validation message:

Re: [Rails] has already been taken on empty field

2010-10-15 Thread Rob Lacey
You use this :) validates :email, :uniqueness = true, :allow_blank = true RobL http://www.robl.me On 15 October 2010 16:33, Leonel *.* li...@ruby-forum.com wrote: I have a form to add clients and enter their email. The email is not required but should be unique, so I have this at the model.

[Rails] Changing default image_tag folder

2010-10-15 Thread Nick Bourré
Is it possible to change the default image_tag folder? -- 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 unsubscribe from

[Rails] Appointment History template page

2010-10-15 Thread Leonel *.*
Ok so I got an Appointments page (index.html.erb) How would I go about adding an Appointment History page? 1) adding a history.html.erb and editing my routes? or 2) use some kind of get parameter (e.g. /appointments/history) and adding it to the appointments controller (eg def history )? --

[Rails] Re: Newbie - Rails 3 lightbox?

2010-10-15 Thread Anders_P
Hi! Thanks for your quick answer. I've tried: span class=ad_image a href=%= ad.image.url(:thumb) % class=lightboximg src=%= ad.image.url(:thumb) % //a /span But that didn't work either. It links to the image but not with a popup effect. It just redirects to the image url and shows a page with

[Rails] Re: Apache httpd config for Passenger?

2010-10-15 Thread chris
On Oct 14, 10:27 am, Hassan Schroeder hassan.schroe...@gmail.com wrote: Does anyone have recommended/suggested args to configure? I've just build passenger from source with any stock Apache, really splitting hairs trying to get more performance at that layer. Apache is really only going to

[Rails] I want to try cucumber but............

2010-10-15 Thread Mauro
Here is my Gemfile: gem jruby-openssl gem will_paginate, ~ 3.0.pre2 gem rubycas-client gem 'foreigner' gem 'warbler' group :test, :development do gem 'capybara' gem 'database_cleaner' gem 'cucumber-rails' gem 'cucumber' gem 'rspec-rails', '=2.0.0.beta.22' gem 'spork' gem 'launchy'

Re: [Rails] Re: Newbie - Rails 3 lightbox?

2010-10-15 Thread Walter Lee Davis
Oh, try linking to the full size image. Here's how the rendered HTML works in one of my pages: a href=path/to/full_size_image.jpg class=lightwindowimg src=path/to/thumbnail_image.jpg width=123 height=123 alt=foo / /a Walter On Oct 15, 2010, at 11:58 AM, Anders_P wrote: Hi! Thanks for

Re: [Rails] I want to try cucumber but............

2010-10-15 Thread David Kahn
On Fri, Oct 15, 2010 at 11:08 AM, Mauro mrsan...@gmail.com wrote: When I run jruby script/rails generate cucumber:install --help I have this error: /home/user/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:28:in `ffi_lib': Could not open library 'xml2' : xml2: cannot open shared object

Re: [Rails] has already been taken on empty field

2010-10-15 Thread Walter Lee Davis
On Oct 15, 2010, at 11:33 AM, Leonel *.* wrote: I have a form to add clients and enter their email. The email is not required but should be unique, so I have this at the model. CLIENT validates :email, :uniqueness = true Some clients have NO email on record. So when I try to add a second

Re: [Rails] Re: Newbie - Rails 3 lightbox?

2010-10-15 Thread Walter Lee Davis
It's class=lightwindow to get the effect to fire. Walter On Oct 15, 2010, at 11:58 AM, Anders_P wrote: class=lightbox -- 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

[Rails] Re: causes of occasional ActionController::InvalidAuthenticityToken exceptions

2010-10-15 Thread Matthias
I'm having the same problems on a production website. It has several hundreds of visitors each days and this error occurs occasionally (more or less 1-3 times a week). Looking at the logs I see it is an actual visitor doing 'normal' things. I also saw a visitor that had it several times in a short

[Rails] Re: Re: Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-10-15 Thread Brad M.
Tim Session contains objects whose class definition isn\'t available. Remember to require the classes for all objects kept in the session. (Original exception: #{const_error.message} [#{const_error.class}]) This is because the class definition for flash notifications changed. You can see

Re: [Rails] What's the best open source Rails Facebooker project to learn from?

2010-10-15 Thread Philip Hallstrom
Hi, I'm creating social network app that integrates with Facebook connect. I'm looking for an open source Facebooker or facebooker2 project that i can look at the code and learn from. I haven't updated it in quite awhile, but you can look at... http://facebooker.pjkh.com Code is all on

[Rails] Beautiful and meaningful urls

2010-10-15 Thread DanC
Hi, I have an app with nested resources - categories and services, so my routes.rb contains the following map.resources :categories do |category| category.resources :services do |service| end Obviously this gives me urls like /categories/1/services/2 I would like to modify the app to

[Rails] Why is include_root_in_json true now

2010-10-15 Thread pipplo
I've been trying to understand this for a bit now, and I can't find any discussion on why the change was made. The default value used to be false, but now it is true? When I do something like this it is nice to have the root value: format.json { render :json = @user } {user:{}} But if I want to

[Rails] Re: Beautiful and meaningful urls

2010-10-15 Thread Tim Shaffer
The to_param method on your model is what gets called to generate the ID for the URL. So a simple solution is to just change that. Lets say your Category model has a unique slug field. You could change it to this: class Category def to_param self.slug end end Then instead of finding by

[Rails] bookmarklet for switching official doc versions

2010-10-15 Thread tshim
Hi, I created a simple bookmarklet that many of you will find useful. It allows you to quickly view the 2.x documentation (blue) when viewing the 3.x version (red). http://humanoriented.com/dist/red2blue Enjoy. -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Beautiful and meaningful urls

2010-10-15 Thread tshim
I would like to modify the app to display more human urls like /categories/category_name/services/service_name See the relevant railscast. -- 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

[Rails] Re: Newbie - Rails 3 lightbox?

2010-10-15 Thread Anders_P
Hi, I think we were talking about different modal window plugins. But I've changed to LightWindow now, it seems much better. I'm now getting the same output as you from my source code, span class=ad_image a href=%= ad.image.url(:original) % class=lightwindowimg src=%= ad.image.url(:thumb) %

[Rails] Re: Newbie - Rails 3 lightbox?

2010-10-15 Thread Anders_P
Hi, I think we were talking about different modal window plugins. But I've changed to LightWindow now, it seems much better. I'm now getting the same output as you from my source code, span class=ad_image a href=%= ad.image.url(:original) % class=lightwindowimg src=%= ad.image.url(:thumb) %

[Rails] Ruby as a web client

2010-10-15 Thread Alex
Hello, I need to write a program that will talk http to some web applications. I was thinking to use Rack. I am not sure what would be a good way to do this. Is there a better or higher level gem that I can use for this. Thanks in advance! Alex -- You received this message because you are

[Rails] Rails 3 helper method issue

2010-10-15 Thread croz
Hi all, I'm trying to upgrade my Rails app from 2.3.8 to 3.0.1. From within my view I have this method: title ('test', true) In my application_helper file the method header looks like this: title(title = nil, ignore = nil) And the error I get is: syntax error, unexpected ',', expecting ')'

[Rails] calling hashes from another hash

2010-10-15 Thread casper
I am trying to get this going where i have this build array and then I have an array of hashes named after the items in the build. Depending upon what is in the array, I want to read the arrays of hashes. I wrote this simple script, but does not work. Any solns build = [ log , top ]

[Rails] Re: Ruby as a web client

2010-10-15 Thread Frederick Cheung
On Oct 15, 5:21 pm, Alex alex.kat...@gmail.com wrote: Hello,  I need to write a program that will talk http to some web applications. I was thinking to use Rack. I am not sure what would be a good way to do this. Is there a better or higher level gem that I can use for this. Rack isn't

[Rails] Re: Rails 3 helper method issue

2010-10-15 Thread Frederick Cheung
On Oct 15, 7:00 pm, croz secros...@gmail.com wrote: Hi all, I'm trying to upgrade my Rails app from 2.3.8 to 3.0.1. From within my view I have this method: title ('test', true) In my application_helper file the method header looks like this: title(title = nil, ignore = nil) And the

  1   2   >