[Rails] attaching multiple files at a time on a has_many through

2010-08-09 Thread Tom Mac
Hi My models are class MessageThread < ActiveRecord::Base has_many :messages accepts_nested_attributes_for :messages end class Message < ActiveRecord::Base has_many :message_participants belongs_to :message_thread has_many :document_messages has_many :documents, :through => :docum

[Rails] Rails best practice to check an object’s e xistence before displaying an attribute in a layout

2010-08-09 Thread wtb
I have the following code in a layout: Posted <%=time_ago_in_words post.created_at %> ago <% if post.has_tag != nil %> in the <%= post.get_first_tag.name %> category <% end %> And the following code in the post model which is inheriting form ActiveRecord::Base def has_tag !self.tags.empty? en

[Rails] Hello and some clarity please before I start

2010-08-09 Thread mikertjones
Hello I have been following a few Ruby on Rails tutorials developing some simple apps with inspiring levels of success. The reason is that I have a large project which I would consider using RoR for (previously I have developed using PHP + Codeigniter as a framework). The speed of development with

Re: [Rails] Re: bundler 1.0.0 RC makes me crazy

2010-08-09 Thread Luis Correa d'Almeida
Same here. Although the work around suggested earlier (chmod 777 vendor/gems) works. On Wed, Aug 4, 2010 at 3:43 PM, Ivan Brykov wrote: > Just upgraded to bundler 1.0.0. rc3. Nothing has changed. When can I > expect working solution? > -- > Posted via http://www.ruby-forum.com/. > > -- > You rec

[Rails] Re: script/server throws out lot of errors

2010-08-09 Thread Anubhaw Prakash
Karthikeyan wrote: > Hello, > > I use Rails 2.3.8 on my Ubuntu (10.04) machine. I started a new app > and when I started it using script/server , I get these following > errors > > => Booting Mongrel > => Rails 2.3.8 application starting on http://0.0.0.0:3000 > /var/lib/gems/1.8/gems/rails-2.3.8

[Rails] script/server throws out lot of errors

2010-08-09 Thread Karthikeyan
Hello, I use Rails 2.3.8 on my Ubuntu (10.04) machine. I started a new app and when I started it using script/server , I get these following errors => Booting Mongrel => Rails 2.3.8 application starting on http://0.0.0.0:3000 /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:271:in `require_f

[Rails] Re: where can I get up to date instantrails ?

2010-08-09 Thread Dani Dani
thank you all. Aptana (RadRails) is an IDE. I'm looking for a ready package to install, soeting like InstantRails, but uptodate. Any ideas ?. regards, Dani -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta

[Rails] Re: rake db:create uninitialized constant Mysql::Error

2010-08-09 Thread Krishna Krishnamaneni
I had similar problem after upgrading to Snow leopard, i had to reinstall the Mysql gem with right architecture flags. Michael Michael wrote: > I have yet to find a solution for this issue I have tried multiple > things that I have found on google, but yet have i found a solution. If > someone co

[Rails] Re: Re: Locking Images in HTML Files..can use it on ROR also

2010-08-09 Thread Jeffrey Bonson
Thank you all,for your VALUABLE information. I didn't find what i needed in this forum and many newbies are using this as a reference. That's why i posted this. Why don't u guys prove what u have written with some CODES, so that it becomes useful to OTHERS as well. Peter Hickman wrote: > Howev

[Rails] Re: Paperclip Trouble - Not Writing to the Database

2010-08-09 Thread Parker Selbert
A. Leek wrote: > > I poked around and it seemed to be a problem with ImageMagick, which I > didn't have installed. I installed it and checked that the PATH was > right, but it keeps giving the the same error. Looking around, I tried > the solution here: > http://snipplr.com/view/29445/getting-

[Rails] Re: What Advice Would You Give A Rails Newbie?

2010-08-09 Thread Agoofin
I found a couple of good books, Simply Rails 2 by Lenz is my favorite. Of course it's for Rails 2. You may have to wait for a while for the new crop of Rails 3 books to come out. Or try to update the examples to work in Rails 3. Judging by your questions about template engines and user management,

[Rails] Re: Paperclip Trouble - Not Writing to the Database

2010-08-09 Thread Agoofin
I didn't see the avatar_file_size, avatar_content_type, and avatar_created_at fields in your form. I don't know if these are required though as they should be created when you submit a file_field. You can store the images in the database if you want to, but most would recommend you don't. Have yo

[Rails] Re: Paperclip - Amazon S3 - https

2010-08-09 Thread Sandy
Daniel, While I'm sure that you had good intentions, the tutorial to which you referred is absolutely unrelated to the question I asked. Specifically, I clearly stated that I know how to use Paperclip to upload files to S3, and to create a url to retrieve the files. My question was whether anyon

[Rails] Re: where can I get up to date instantrails ?

2010-08-09 Thread Jerome Fillioux
Hum, in fact this is RadRails, and not InstantRails On 10 août, 00:55, Jerome Fillioux wrote: > Hi, > > InstantRails has been embeded in Aptana for now :http://www.aptana.com/ > > On 9 août, 21:18, Dani Dani wrote: > > > > > Hi, can someone please tell me where can I find up-to-date instantrails

[Rails] Re: where can I get up to date instantrails ?

2010-08-09 Thread Jerome Fillioux
Hi, InstantRails has been embeded in Aptana for now : http://www.aptana.com/ On 9 août, 21:18, Dani Dani wrote: > Hi, can someone please tell me where can I find up-to-date instantrails > (with rails 2.38, ruby 1.8.7) ... ? > Thanks for any help > Dani > -- > Posted viahttp://www.ruby-forum.co

[Rails] Expanding tests with own methods

2010-08-09 Thread Jim Burgess
I want to call the method 'url_for' in my functional test. e.g. assert_select "a[href=?]", url_for(:action => :new), :text => 'Neue Seite' The book I am reading suggests doing this: class PagesControllerTest < ActionController::TestCase def setup def self.url_for(options, *parameters_for_method

[Rails] Re: What is @controller instance variable?

2010-08-09 Thread Jim Burgess
> It not that @controller contains a reference to you controller - > it is an actual instance of it. OK, I phrased that badly. > And 'prepending a method call' sounds like you think there is some > magic going on - there isn't - methods are always called on a certain > object (omitting the objec

[Rails] Want my daemons to have their own logger instance

2010-08-09 Thread Tom S
I have a daemon named "sketcher" and I want everything related to the "sketcher" program to go to "sketcher.log" I've tried putting logger = Logger.new(File.join("#{RAILS_ROOT}/log", "sketcher.log") in the top method of the daemon, but this only succeeds in getting messages from that same clas

[Rails] Re: What is @controller instance variable?

2010-08-09 Thread Frederick Cheung
On Aug 9, 9:08 pm, Jim Burgess wrote: > Hi, > > Thanks for all of the replies. > That has really made things a lot clearer for me. > > So, to summarize: > > 'url_for' is a method defined in ActionController::Base. > > @controller is an instance variable initiated by > ActionController::TestCase co

[Rails] Logging form delayed job class

2010-08-09 Thread badnaam
I have asked this before without any luck, trying again. this is what I have in my dj.rb initializer Delayed::Worker.backend = :active_record Delayed::Worker.logger = Rails.logger #Delayed::Worker.logger = ActiveSupport::BufferedLogger.new("log/ ##{Rails.env}_delayed_jobs.log", Rails.logger.level

[Rails] Re: What is @controller instance variable?

2010-08-09 Thread Jim Burgess
Hi, Thanks for all of the replies. That has really made things a lot clearer for me. So, to summarize: 'url_for' is a method defined in ActionController::Base. @controller is an instance variable initiated by ActionController::TestCase containing a reference to my controller (PagesController)

Re: [Rails] Get integers for all months between two dates

2010-08-09 Thread Daniel Alejandro Gaytán Valencia
I would do it this way: def get_months_and_year(st, ed) m = [] if ed >= st years = ed.year - st.year if years == 0 (st.month..ed.month).each{|month| m << [month, st.year] } elsif years > 0 (st.month..12).each{|month| m << [month, st.year] } (st.year+1..ed.year-1).

[Rails] Re: Error: cross-thread violation on rb_gc()

2010-08-09 Thread Spong
I think I did install multiple instances of Ruby. How can I tell? And how can I remove the extra? Yes, I believe I did install one via MacPorts, and another manually. I'm also new to Macs. On Aug 9, 2:13 pm, Chris Mear wrote: > On 9 August 2010 03:23, Spong wrote: > > > > > > > I don't like cr

Re: [Rails] Get integers for all months between two dates

2010-08-09 Thread Colin Law
On 9 August 2010 18:52, Tim Booher wrote: > > I have the following method which should work in Rails, but I am not > sure if this is the best implementation. It looks a little clumsy, given > all the good helpers in rails. Am I missing a much better way to do > this? > > def get_months_and_years(s

Re: [Rails] where can I get up to date instantrails ?

2010-08-09 Thread jason white
I don't believe InstantRails is being maintained anymore. You can look at BitNami's Ruby Stack, or VirtualRails(it runs as a VM) Jason On Mon, Aug 9, 2010 at 2:18 PM, Dani Dani wrote: > Hi, can someone please tell me where can I find up-to-date instantrails > (with rails 2.38, ruby 1.8.7) ... ?

Re: [Rails] What is @controller instance variable?

2010-08-09 Thread Chris Mear
On 9 August 2010 20:14, Jim Burgess wrote: > In a book I'm reading the author tries to do the following from within > his controller test file: > > class PagesControllerTest < ActionController::TestCase >  def test_create_link_in_index >    get :index >    assert_select "a[href=?]", url_for(:actio

Re: [Rails] What is @controller instance variable?

2010-08-09 Thread Bill Walton
Hi Jim, On Mon, Aug 9, 2010 at 2:14 PM, Jim Burgess wrote: > How is he able to reference a method defined in another class, simply by > prefixing the method call with '@controller' > > Could someone explain what is '@controller' in this context? See Section 4.4 Instance Variables in http://guide

[Rails] Re: What is @controller instance variable?

2010-08-09 Thread Frederick Cheung
On Aug 9, 8:14 pm, Jim Burgess wrote: > assert_select "a[href=?]", @controller.url_for(:action => :new, > :only_path => true), :text => 'Neue Seite' > > How is he able to reference a method defined in another class, simply by > prefixing the method call with '@controller' > > Could someone expl

[Rails] Re: How could I get the routes namespace in the view?

2010-08-09 Thread Robert Walker
Xu Wenhao wrote: > I am wondering is there any way I could find the current namespace, > which is supplier to generate the url in a common partial or page? I haven't taken the time to fully think this through, but on the surface I would be questioning the need for views to have any direct knowled

[Rails] where can I get up to date instantrails ?

2010-08-09 Thread Dani Dani
Hi, can someone please tell me where can I find up-to-date instantrails (with rails 2.38, ruby 1.8.7) ... ? Thanks for any help Dani -- 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 thi

Re: [Rails] Paperclip - Amazon S3 - https

2010-08-09 Thread Daniel Alejandro Gaytán Valencia
Take a look at: http://scottmotte.com/archives/181.html Regards, Daniel Gaytán 2010/8/9 Sandy > I am able to use Paperclip to save files to Amazon's S3 storage. Once > saved, the files are available using a URL associated with the b

[Rails] What is @controller instance variable?

2010-08-09 Thread Jim Burgess
In a book I'm reading the author tries to do the following from within his controller test file: class PagesControllerTest < ActionController::TestCase def test_create_link_in_index get :index assert_select "a[href=?]", url_for(:action => :new), :text => 'Neue Seite' end end However t

Re: [Rails] Error: cross-thread violation on rb_gc()

2010-08-09 Thread Chris Mear
On 9 August 2010 03:23, Spong wrote: > I don't like cross-posting, but there doesn't seem to be much activity/ > response to my question on StackOverflow. > > Link to SO: > http://stackoverflow.com/questions/3413209/error-cross-thread-violation-on-rb-gc > > Question: > > I'm new to Ruby on Rails.

[Rails] Re: DateTime#civil specs

2010-08-09 Thread Fritz Trapper
Thanks! -- 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 this group, send email to rubyonrails-talk+uns

Re: [Rails] DateTime#civil specs

2010-08-09 Thread Rob Biedenharn
On Aug 9, 2010, at 11:30 AM, Fritz Trapper wrote: Where to find the specs for DateTime#civil? http://www.ruby-doc.org/stdlib/ Or, more specifically: http://www.ruby-doc.org/stdlib/libdoc/date/rdoc/classes/DateTime.html But the top-level link for Ruby's Standard Library RDoc is a good one

[Rails] Get integers for all months between two dates

2010-08-09 Thread Tim Booher
I have the following method which should work in Rails, but I am not sure if this is the best implementation. It looks a little clumsy, given all the good helpers in rails. Am I missing a much better way to do this? def get_months_and_years(st,ed) m = [st.month] d = st.beginning_of_month

[Rails] Re: Flashed sign up and sign out messages - Devise

2010-08-09 Thread Abder-Rahman Ali
Thanks a lot Andre. -- 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 this group, send email to rubyonra

[Rails] Re: how to test multiple logins from single host ?

2010-08-09 Thread chris
You can use a different browser (Firefox and Mozilla, Mozilla and IE, etc). They will get their own cookie and session ID On Aug 9, 11:23 am, Jedrin wrote: >  When logging in to a web server using watir or some other means > through rails test api, we would like to test things like multiple > us

[Rails] Paperclip - Amazon S3 - https

2010-08-09 Thread Sandy
I am able to use Paperclip to save files to Amazon's S3 storage. Once saved, the files are available using a URL associated with the bucket and filename. I have not been able to find a good tutorial which clearly explains how to save a file to S3 (using Paperclip) whereby it can only be retrieved

[Rails] Re: Can't quit server after running script/server command

2010-08-09 Thread Marnen Laibow-Koser
Paul Denlinger wrote: > Am working on first_app for RoR and am running Ruby 1.8.7 and Rails > 2.3.8 on Mac OSX Snow Leopard. > > Having trouble after I run the script/server command which boots up > Mongrel. When I press Control-C to quit the server, I get no response. > > What is wrong, I'm no

[Rails] Can't quit server after running script/server command

2010-08-09 Thread pauld
Am working on first_app for RoR and am running Ruby 1.8.7 and Rails 2.3.8 on Mac OSX Snow Leopard. Having trouble after I run the script/server command which boots up Mongrel. When I press Control-C to quit the server, I get no response. What is wrong, and what can I do to correct the issue? Tha

[Rails] DateTime#civil specs

2010-08-09 Thread Fritz Trapper
Where to find the specs for DateTime#civil? -- 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 this group,

[Rails] Re: configure question and passenger

2010-08-09 Thread nephish
OK, great, you have been very helpful. Many thanks. shawn On Aug 9, 10:18 am, Marnen Laibow-Koser wrote: > [Please quote when replying.] > > Shawn Bright wrote: > > Right now i am using Nginx with Passenger to deploy. Does this only > > allow for one instance of Rails to run in each virtual host

[Rails] Re: Re: convert 0, "0", "true", etc. to boolean

2010-08-09 Thread Ka Be
In rails 2, you can use ActiveRecord::ConnectionAdapters::Column.value_to_boolean("0") for 1,0,'true','false','1','0', 't', and 'f'. -- 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 t

[Rails] how to test multiple logins from single host ?

2010-08-09 Thread Jedrin
When logging in to a web server using watir or some other means through rails test api, we would like to test things like multiple users logged in as well as different functionality. The problem seems to be that the website uses sessions to store various info and multiple requests from the same h

Re: [Rails] Re: Validation problem

2010-08-09 Thread Hassan Schroeder
On Mon, Aug 9, 2010 at 8:08 AM, RichardOnRails wrote: >> I'd suggest that it's good practice to handle any (even nil) input value >> in a way appropriate to your business logic. > > I've code exactly the logic I wanted, except for how to enforce that a > vendor be selected from the drop-down befo

[Rails] Re: configure question and passenger

2010-08-09 Thread Marnen Laibow-Koser
[Please quote when replying.] Shawn Bright wrote: > Right now i am using Nginx with Passenger to deploy. Does this only > allow for one instance of Rails to run in each virtual host? More than one instance. > I read in the Agile book that Rails is single thread and can only > process one request

Re: [Rails] Re: Validation problem

2010-08-09 Thread Colin Law
On 9 August 2010 16:08, RichardOnRails wrote: > Hi Hassan, > >> > It can't be nil.  When the form is instantiated >> >> Assuredly, it can be -- a request can be generated without your form >> being involved at all. > > I don't get it.  Can you point me to some tutorial that deals with > this issue

[Rails] Re: Validation problem

2010-08-09 Thread Marnen Laibow-Koser
RichardOnRails wrote: > Hi Hassan, > >> > It can't be nil. �When the form is instantiated >> >> Assuredly, it can be -- a request can be generated without your form >> being involved at all. > > I don't get it. Can you point me to some tutorial that deals with > this issue? What do you need a t

Re: [Rails] Re: 3tier suggestion (ROR <--> ROR <--> DB

2010-08-09 Thread tramuntanal
Hi, (not discussing if your approach is the best) You can create a Service layer (search for Domain Driven Development layers) in top of your logic in the business app, in fact you should. And make it accessible in the presentation tier via EJB invocation. I think it will be better performant and f

[Rails] Re: Validation problem

2010-08-09 Thread RichardOnRails
Hi Hassan, > > It can't be nil.  When the form is instantiated > > Assuredly, it can be -- a request can be generated without your form > being involved at all. I don't get it. Can you point me to some tutorial that deals with this issue? > I'd suggest that it's good practice to handle any (eve

[Rails] Re: configure question and passenger

2010-08-09 Thread nephish
Right now i am using Nginx with Passenger to deploy. Does this only allow for one instance of Rails to run in each virtual host? I read in the Agile book that Rails is single thread and can only process one request at a time. I guess i need a more parallel approach. Also, and i did not think of thi

[Rails] Re: Validation problem

2010-08-09 Thread RichardOnRails
Thanks for your response. That fulfilled my implementation goal perfectly. Best wishes, Richard On Aug 8, 11:41 pm, Ar Chron wrote: > RichardOnRails wrote: > > Hi All, > > > I've got an Expense model as follows: > > > class Expense < ActiveRecord::Base > >   belongs_to :vendor > > >   def valid

[Rails] Re: 3tier suggestion (ROR <--> ROR <--> DB

2010-08-09 Thread Pinit Asavanuchit
Thanks. I have to build Rails App to deploy on existing architecture. It's Jboss (java) which I have successfully test it with jruby. I have 1st server that all client can access in the same time it can see 2nd server which client don't 2nd server running jboss too which can connect to database

[Rails] Re: configure question and passenger

2010-08-09 Thread Marnen Laibow-Koser
Shawn Bright wrote: > Fred, > > Great, thanks for the reply. Do you know what book or site may have a > good tutorial about how to pull this off? Most of the docs and > tutorials i find just show setting up and nginx server with passenger. Passenger (with either Nginx or Apache) is usually the si

[Rails] Re: configure question and passenger

2010-08-09 Thread nephish
Fred, Great, thanks for the reply. Do you know what book or site may have a good tutorial about how to pull this off? Most of the docs and tutorials i find just show setting up and nginx server with passenger. Thanks again On Aug 9, 4:02 am, Frederick Cheung wrote: > On Aug 9, 5:33 am, nephish

[Rails] Re: Test Database Empty after "rake test"?

2010-08-09 Thread Marnen Laibow-Koser
Heinz Strunk wrote: > Hey, > > can somebody tell me why my test database is always empty after I run > "rake test" but not after I test single test files? My rake db:seed for > the test database takes like 6 minutes and I don't really wanna reseed > it every time I run "rake test". Is it possible

[Rails] Re: What Advice Would You Give A Rails Newbie?

2010-08-09 Thread Marnen Laibow-Koser
Chris Mear wrote: > On 7 August 2010 19:54, Brad Lindsay wrote: >> I'm new to Ruby and to Rails, but have been very impressed by the >> tutorials I've gone through for each. They have convinced me that >> these are the best tools for the solutions I need to create, but >> before I really got star

Re: [Rails] Re: Locking Images in HTML Files..can use it on ROR also

2010-08-09 Thread Peter Hickman
However. If you have the skills or the money to buy them then you do have the same option as Flickr. Display your images from within a Flash app. This means that the source url for the image is harder to find - only harder mind you, wireshark or other similar tools will let you see this. But to b

[Rails] Re: localhost:3000/

2010-08-09 Thread Marnen Laibow-Koser
Ainar Abramovich wrote: > Hi, I'm struggling with logging in to my app. Can somebody tell me how > to do twitter like login? The idea is following -> when the user is > logged out, browser shows localhost:3000/ and on main page is shown > websites domain name etc.. with NO posts, and when he is log

[Rails] Re: Auto-increment column scoped to another column

2010-08-09 Thread Marnen Laibow-Koser
Joao Silva wrote: > Hi, > > I have one field that needs to be incremented automatically, but be > scoped to another column. So it should increment based on the last value > of the previous row with the same value of the scoped column. Remember to figure out how it will behave with deleted records

[Rails] Re: Geokit Plugin On Hosted Server

2010-08-09 Thread Ariel De La Rosa
Chris Mear wrote: > On 9 August 2010 06:23, Ariel De la rosa wrote: >> Loading production environment (Rails 2.2.2) >> >> @full_address="New York, NY, USA", @provider="google", @zip=nil, >> @all=[#], @lng=-74.0059731, @success=true, >> @state="NY", @lat=40.7143528, @province="New York"> >> >> >> A

[Rails] Re: Simple File Upload to a Blob column in a SQLite DB

2010-08-09 Thread Marnen Laibow-Koser
Xenio wrote: > I have a DB that is already populated with data. There is a table > called clubs that has an logo_big field set up as a blob. I have > successfully used send_data to display the jpg pictures as I need them > in the views. I just need to setup the edit/new view to enable me to > uploa

[Rails] Re: Locking Images in HTML Files..can use it on ROR also

2010-08-09 Thread Robert Walker
Jeffrey Bonson wrote: > I was looking for this locking procedure. and found out the below code > works like no one can click on the image and save it other than > printscreen. this is best when a high resolution background image is > being used. For what it's worth, disabling mousedown events in J

[Rails] Re: Rails 3 - Ruby 1.9.2 - cannot output correctly HTML special characters

2010-08-09 Thread Erwin
Thanks Peter .. I missed that : copyright.html_safe On 9 août, 14:09, Peter De Berdt wrote: > On 09 Aug 2010, at 13:54, Erwin wrote: > > > this is my first Rails3-Ruby 1.9.2 test app.. > > I cannot out a simple html string w special characters like © > > > copyright = "Copyright © " + " 2010

[Rails] MySQL rake db:migrate gives me dyld: lazy symbol binding failed: Symbol not found: _mysql_init

2010-08-09 Thread neigaard
Hi When I do a "rake db:migrate", I get the following error: (in /Users/sneigaard/work/rails/mailtimer) dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/ mysql_api.bundle Expected in: flat namespace dyld: Symbol

[Rails] Re: Creation of XML with objects

2010-08-09 Thread Frederick Cheung
On Aug 9, 2:16 pm, Mike Disuza wrote: > Hi, > I need the "company_id" in the XML. > > render :xml=> @user will only include the user attributes. > Is the assocation user has_one company ? If so (ie user has no company_id attribute) then the easiest thing is probably to write a method on user th

[Rails] Re: Re: Creation of XML with objects

2010-08-09 Thread Mike Disuza
Hi, I need the "company_id" in the XML. render :xml=> @user will only include the user attributes. Thanks, Mike -- 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

Re: [Rails] Re: Creation of XML with objects

2010-08-09 Thread Mickael Gerard
Hello, if you remove the :include => :company only the company_id will be serialized. The following code should work as you expect : render :xml => @user Mickael On 9 August 2010 13:00, Mike Disuza wrote: > Hi Fred, > How can I create user defined xml structure? > > My previous code gives me

[Rails] Re: Creation of XML with objects

2010-08-09 Thread Frederick Cheung
On Aug 9, 12:00 pm, Mike Disuza wrote: > Hi Fred, > How can I create user defined xml structure? > > My previous code gives me xml like: > > Mike> > m...@yahoo.com > >    2 >    ABC > > > > I need to create a XML like this:- > > >     Mike >     m...@yahoo.com >     2 > If the default to_

[Rails] Re: 3tier suggestion (ROR <--> ROR <--> DB

2010-08-09 Thread Marnen Laibow-Koser
Pinit Asavanuchit wrote: > Yes. I'm in situation to adapt this great MVC to multi-tier. Exactly > what you said. > which the first ROR of 1st server will act like web server talk to 2nd > another ROR (application tier) server be-hide firewall. > What's the point? I don't see why you'd need 2 R

Re: [Rails] 3tier suggestion (ROR <--> ROR <--> DB

2010-08-09 Thread Chris Mear
On Sunday, August 8, 2010, Pinit Asavanuchit wrote: > I have to develop an ROR application that talk to it's self. > > 3 Server (1st server ROR <---> 2nd server ROR <---> 3rd server DBMS) > > How can I easily develop this ? I've heard of similar architectures where the two Rails tiers use ActiveR

Re: [Rails] rd /S /Q depot

2010-08-09 Thread Colin Law
On 9 August 2010 13:11, pravin mishra wrote: > hi > > can any one tell me about > what is use of this command > > ""rd /S /Q depot""  in window > ""rm -rf depot""  in linux This does not seem to be a rails question, but anyway: If you are using linux then the enter the command man rm in a termin

[Rails] rd /S /Q depot

2010-08-09 Thread pravin mishra
hi can any one tell me about what is use of this command ""rd /S /Q depot"" in window ""rm -rf depot"" in linux here depot is the database name actually i have seen this command in agil web development tutorial thanks -- You received this message because you are subscribed to the Google Gr

Re: [Rails] Rails 3 - Ruby 1.9.2 - cannot output correctly HTML special characters

2010-08-09 Thread Peter De Berdt
On 09 Aug 2010, at 13:54, Erwin wrote: this is my first Rails3-Ruby 1.9.2 test app.. I cannot out a simple html string w special characters like © copyright = "Copyright © " + " 2010 , TestApp Ltd." using copyright in my view, I see displayed Copyright © 2010, TestApp Ltd. what's wrong ? wh

[Rails] Rails 3 - Ruby 1.9.2 - cannot output correctly HTML special characters

2010-08-09 Thread Erwin
this is my first Rails3-Ruby 1.9.2 test app.. I cannot out a simple html string w special characters like © copyright = "Copyright © " + " 2010 , TestApp Ltd." using copyright in my view, I see displayed Copyright © 2010, TestApp Ltd. what's wrong ? what's missing somewhere (was running well i

[Rails] Re: virtual rails....installing rails????

2010-08-09 Thread Jerome Fillioux
Hi Rich, You must have misunderstood the goal of virtualrails :) All you try to install is ***ALREADY*** installed on virtualrails : ruby, rails, sqlite, rubygems, and so on...(see complete list of what is already in virtualrails here : http://www.virtualrails.org/node/6 So you can bypass the "i

[Rails] Re: Locking Images in HTML Files..can use it on ROR also

2010-08-09 Thread Matt Jones
On Aug 9, 3:26 am, Jeffrey Bonson wrote: > I was looking for this locking procedure. and found out the below code > works like no one can click on the image and save it other than > printscreen. this is best when a high resolution background image is > being used. Is there a *question* here? In

[Rails] Re: Creation of XML with objects

2010-08-09 Thread Mike Disuza
Hi Fred, How can I create user defined xml structure? My previous code gives me xml like: Mike> m...@yahoo.com 2 ABC I need to create a XML like this:- Mike m...@yahoo.com 2 Any help appreciated. Thanks, Mike -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: bundler 1.0.0 RC makes me crazy

2010-08-09 Thread Jeff Gardner
I'm in the same boat: bundler 1.0.0.rc3 cant find the gems that are pulled from git.. Any idea when we might get a solution to this? Or is this a Passenger bug? On Aug 4, 4:43 pm, Ivan Brykov wrote: > Just upgraded to bundler 1.0.0. rc3. Nothing has changed. When can I > expect working solution?

[Rails] Re: Creation of XML with objects

2010-08-09 Thread Frederick Cheung
On Aug 9, 11:15 am, Mike Disuza wrote: > Hi, > I am trying to get the response in xml format. > For that I have written following code > >  def user_details >     @user=User.find(params[:id]) >     @compa...@user.company >     respond_to do |format| >       format.xml {render :xml=> @user.to_xml

[Rails] Creation of XML with objects

2010-08-09 Thread Mike Disuza
Hi, I am trying to get the response in xml format. For that I have written following code def user_details @user=User.find(params[:id]) @compa...@user.company respond_to do |format| format.xml {render :xml=> @user.to_xml(:include => @company)} end end I am getting followi

[Rails] How could I get the routes namespace in the view?

2010-08-09 Thread wenhao...@gmail.com
I am currently working on an extension for spree. In this extension, we introduce more roles than the current user and admin role. For the new role, like a product supplier, we will only let them manage the products information the supplier provide. So I created a routes.rb in the extension like th

Re: [Rails] Geokit Plugin On Hosted Server

2010-08-09 Thread Chris Mear
On 9 August 2010 06:23, Ariel De la rosa wrote: > Hi, I am new here, but I hope somebody have a clue about this issue. > > I am using rails 2.2.2 and the geokit gem. It works very good for a > while, but for unknown reason it stopped working on my hosting server, > but it still working alright on

Re: [Rails] Updating a collection in a RESTful manne r…

2010-08-09 Thread Chris Mear
On 7 August 2010 22:07, Tim Harding wrote: > Today I added a checkbox to each row of a table and a save button, to > perform an Archive operation on N items in the table. > > This is essentially an update of the collection. > > My initial thought was to PUT to students_path but only GET and POST >

Re: [Rails] virtual rails....installing rails????

2010-08-09 Thread Chris Mear
On 9 August 2010 10:34, Chris Mear wrote: > On 9 August 2010 04:53, Rich d wrote: >> I am running windows vista on my laptop.  i installed virtual machine >> and virtual rails and am using linux mint.  after the installation i >> followed a tutorial which had me do the following: >> >> 1. Log in

Re: [Rails] virtual rails....installing rails????

2010-08-09 Thread Chris Mear
On 9 August 2010 04:53, Rich d wrote: > I am running windows vista on my laptop.  i installed virtual machine > and virtual rails and am using linux mint.  after the installation i > followed a tutorial which had me do the following: > > 1. Log in and open a terminal if you need to. First we'll in

Re: [Rails] Re: Simple File Upload to a Blob column in a SQLite DB

2010-08-09 Thread Chris Mear
On 9 August 2010 00:15, Xenio wrote: > On Aug 8, 4:48 pm, Xenio wrote: >> I have a DB that is already populated with data. There is a table >> called clubs that has an logo_big field set up as a blob. I have >> successfully used send_data to display the jpg pictures as I need them >> in the views

[Rails] Re: configure question and passenger

2010-08-09 Thread Frederick Cheung
On Aug 9, 5:33 am, nephish wrote: > Greetings all. > I have seen a couple of diagrams on the net that look like  a computer > set up as an nginx server and more than one mongrel server running at > once. > What is the advantage of having more than one mongrel server running? > Is there a good ho

[Rails] Error: cross-thread violation on rb_gc()

2010-08-09 Thread Spong
I don't like cross-posting, but there doesn't seem to be much activity/ response to my question on StackOverflow. Link to SO: http://stackoverflow.com/questions/3413209/error-cross-thread-violation-on-rb-gc Question: I'm new to Ruby on Rails. I ran the following in a terminal when I was going

[Rails] Re: Bundle Install issue

2010-08-09 Thread Agnieszka Figiel
Huet wrote: > gem 'paperclip', :git => 'git://github.com/thoughtbot/ > paperclip.git', :branch => "rails3" There's no "rails3" branch in paperclip anymore, that's what the error is about. Agnieszka -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscrib

Re: [Rails] shopping card tutorial

2010-08-09 Thread Sergio Angeletti
Please read: Agile Web Development with Rails ISBN-13: 978-1-9343561-6-6 there is a shopping card, is the perfect book for a beginer. Sergio On Mon, Aug 9, 2010 at 9:44 AM, pravin mishra < diatm.pravin.it.07...@gmail.com> wrote: > hi > > please send me any good tutorial link for shopping car

[Rails] shopping card tutorial

2010-08-09 Thread pravin mishra
hi please send me any good tutorial link for shopping card . where code will present along width explanation. 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-t...@googlegroups.com.

[Rails] http://rails-bestpractices.com launched

2010-08-09 Thread huang zhimin
Hi I'm glad to tell you http://rails-bestpractices.com is now launched. It's a website that provides the best practices to write rails codes and everybody can share his/her practices. It's also the home page of rails_best_practices gem. Now we have two administrators, @ihower is the presenter of

[Rails] Devise :current_password validations and checking (how???)

2010-08-09 Thread Andre Cubeta
Hi Guys, In my devise applications in Rails 3, I created a separate form under my SettingsController class of which it handles the 'Change Password' of the User Model, so i can manipulate the current_user in the SettingsController. Now, I followed the set-up in the Devise/Views on how to update t

[Rails] Re: 3tier suggestion (ROR <--> ROR <--> DB

2010-08-09 Thread Pinit Asavanuchit
Yes. I'm in situation to adapt this great MVC to multi-tier. Exactly what you said. which the first ROR of 1st server will act like web server talk to 2nd another ROR (application tier) server be-hide firewall. Just need suggestion if it has any easy method to implement Rails for this than 2 se