[Rails] Re: problem with showing image

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 4:58 PM, Jay Pangmi < [EMAIL PROTECTED]> wrote: > > Conrad Taylor wrote: > > Hi, what version of Rails are you using? What does the following > > produce in > > script/console: > > > > helper.image_tag( 'nameofimage.png' ) > > > > -Conrad > > Thank Conrad for the help, I t

[Rails] Re: Using the collect method to collect to a 2 dimensional a

2008-09-10 Thread Sijo Kg
Hi Lots of thanks for your great reply.This is what i needed.Now it works. But I have one more problem. I have to find group managers name and email like above and I tried like below name_and_email_managers=Group.get_managers_name_and_emails(problem.primary_assignee_group_id) unless proble

[Rails] How does the sub-domain like urls are created in web apps?

2008-09-10 Thread Rock Roll
Hello, I registered in a site called basecamp. After I registered, they gave me a url like http://xxx.basecamp.com where i have to log in access my project management. I heard that basecamp is built in ruby on rails. I couldn't get the point of building a subdomain like url. Can anyone give s

[Rails] Re: Need help in Ajax Pagination

2008-09-10 Thread Sijo Kg
Hi Add the following code to view_helpers.rb .The file is in vendor/plugins/will_paginate/lib/will_paginate def page_link_or_span(page, span_class = 'current', text = nil) text ||= page.to_s if page and page != current_page if update = @options[:update] @template.lin

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread pepe
Thanks so much to both. :) Pepe On Sep 10, 11:47 pm, "Mikel Lindsaar" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 11, 2008 at 1:43 PM, pepe <[EMAIL PROTECTED]> wrote: > > I create a module ('my_module.rb') with my code and just drop the file > > in folder 'lib', not in 'lib/tasks'. Then I issue a r

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread Mikel Lindsaar
On Thu, Sep 11, 2008 at 1:43 PM, pepe <[EMAIL PROTECTED]> wrote: > I create a module ('my_module.rb') with my code and just drop the file > in folder 'lib', not in 'lib/tasks'. Then I issue a require > 'my_module' in my models and I'm ready to rock & roll? That's right. -- http://lindsaar.net/

[Rails] Re: Time Problem

2008-09-10 Thread Mikel Lindsaar
On Wed, Sep 10, 2008 at 5:41 PM, Sunny Bogawat <[EMAIL PROTECTED]> wrote: > In my application I have to correct the time stamp on event > discussion posts. Perhaps they are not observing DST? In any case, they > are slow by one hour. If you just want to add one hour to the time regardless of t

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread pepe
Sorry, I should have said where all the 'models' are. Sorry if I am little dense here but it's the first time I do this and I want to make sure I understand. I create a module ('my_module.rb') with my code and just drop the file in folder 'lib', not in 'lib/tasks'. Then I issue a require 'my_mod

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread Maurício Linhares
No, you could put it at the "lib" folder and add a require for it in your user model. Putting your module at the helpers folder would make it be included in your view helpers, and i think this is not what you're looking for :) On Wed, Sep 10, 2008 at 11:40 PM, pepe <[EMAIL PROTECTED]> wrote: > >

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread pepe
Thanks Mauricio, If I write the module, do I just put it in the folder where all the modules are? On Sep 10, 10:33 pm, "Maurício Linhares" <[EMAIL PROTECTED]> wrote: > Ideally, you should write a plugin, more on that here > ->https://peepcode.com/products/rails-2-plugin-patterns > > But you cou

[Rails] Re: Common models code - where to put it?

2008-09-10 Thread Maurício Linhares
Ideally, you should write a plugin, more on that here -> https://peepcode.com/products/rails-2-plugin-patterns But you could also just create a simple module and make your models include it. On Wed, Sep 10, 2008 at 11:32 PM, pepe <[EMAIL PROTECTED]> wrote: > > Hello. > > I have some code that I

[Rails] Common models code - where to put it?

2008-09-10 Thread pepe
Hello. I have some code that I want to share between my models (i.e.: text formatting routines). Where would be the correct place to put it? Thanks in advance. Pepe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "R

Join PTC Indonesia, Cuma Klik Iklan Langsung Dibayar dengan RUPIAH Langsung ke Bank Anda

2008-09-10 Thread fatriyanto akase
join klik rupiah (PTC INDONESIA) asli indonesia 1 klik Rp 100, 10x= Rp 1000, 20 ref = Rp 1 dibayar per Rp 5 lewat BCA atau Mandiri. Daftarnya Gratis... semua bisa tanya-jawab di forumnya, bisa beli refferal pake rupiah juga, asyik banget deh. buruan daftar kita ramaikan PTC INDONESIA.

[Rails] Re: specify length / decimal places in a migration?

2008-09-10 Thread Pozole
You should use decimal instead of float. t.column :name, :decimal, :precision => 10, :scale => 2 This will give you numbers as .00, for example (10 digits, 2 digits right of decimal point). Regards, Jorge Corona. On Sep 10, 6:35 pm, "Bill Walton" <[EMAIL PROTECTED]> wrote: > Is it poss

[Rails] Re: dry application architecture

2008-09-10 Thread Miles Georgi
Gabriel, the way I do this personally is to put my models/views/controllers/helpers in a plugin, and then have the plugin loaded via the engines plugin. If you're using all subversion repositories for everything, you can use svn:externals to point to your plugin and you should be good to go. If

[Rails] Off Topic: Lots of Ruby on Rails jobs available

2008-09-10 Thread Ror Jobs
Hi All - Just wanted to let you know about a bunch of new jobs now listed on http://RORJobs.com/";>RORJobs.com: Developer @ Give Real - New York, New York Rails Engineer Serious Business - San Francisco, California Rails Developer for Social Applications @ Context Optional, Inc. - San Francisco

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread MalHayn
Hi Rimantas, What language is your website (http://rimantas.com/ )? Where are you? Thank you so much reporting your test results. It's got to be my setup. I installed Firebug and it reports the exact same output for both the html and rails version. I'm going to remove then reinstall Firefox. I

[Rails] Re: problem with showing image

2008-09-10 Thread Jay Pangmi
Conrad Taylor wrote: > Hi, what version of Rails are you using? What does the following > produce in > script/console: > > helper.image_tag( 'nameofimage.png' ) > > -Conrad Thank Conrad for the help, I tried using script/console and it says its Rails 2.0.2 but doesn't go well, it ends up wit

[Rails] Re: problem with showing image

2008-09-10 Thread Jay Pangmi
Frederick Cheung wrote: > On 10 Sep 2008, at 12:50, Jay Pangmi wrote: > >> >> thanks for the reply man but doesn't help. > > Firebug and things like that allow you to server responses for all of > your requests. I suggest you look at that to find out why your images > aren't loading. > > Fred

[Rails] specify length / decimal places in a migration?

2008-09-10 Thread Bill Walton
Is it possible to specify the length and number of decimal places for a float in a migration? I using MySQL and can do it through the GUI client, but can't Google up anything on doing it in a migration. Thanks, Bill --~--~-~--~~~---~--~~ You received this message

[Rails] ultrasphinx and has_many_polymorphs

2008-09-10 Thread Benjamin Bonnet
those two are a great mix ! in here -> http://notch8.com/articles/2007/10/15/sphinx-and-ultrasphinx-and-eye-on-search get some clues on how to compile models associated to each others (search a service and its provider); but doesn't seem to work with h_m_p, thanks for any clues (might have a lack

[Rails] Re: MySQL lookups on VARCHAR with accents

2008-09-10 Thread Jeffrey L. Taylor
Quoting Frederick Cheung <[EMAIL PROTECTED]>: > > > On 3 Sep 2008, at 00:35, Jeffrey L. Taylor wrote: > > > > > I am running into problems with MySQL and lookups. The table has > > character > > set utf8, but: > > > > mysql> select id, token from tokens where token = 'esta'; > > +---+---

[Rails] Edge rails - wrong number of arguments in validations.rb

2008-09-10 Thread Drogomir
Hi, I have strange error on edge rails while doing validates_uniqueness_of or some other validates_* methods. basically it looks like that: http://pastie.org/269935 it's weird cause ActiveRecord::Errors#add has 3 arguments defined in validations.rb... --~--~-~--~~~

[Rails] Re: rspec story - access session

2008-09-10 Thread David Chelimsky
On Thu, Aug 28, 2008 at 8:41 AM, snitko <[EMAIL PROTECTED]> wrote: > > Very simple, but not googlable: how do I access 'session' in my story? > In rspec controller specs I could just say session[:user] for example, > but this doesn't work here. Hi, There's no support for what you are trying to d

[Rails] Re: schema.rb gotcha and how to load default entries in DB

2008-09-10 Thread Fernando Perez
Thank you that's the kind of plugin I was looking for! -- 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 ruby

[Rails] Re: schema.rb gotcha and how to load default entries in DB

2008-09-10 Thread John Barnette
Hi, On Wed, Sep 10, 2008 at 3:04 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > My question is, if I want to have for instance a default user inserted > into DB such as an admin user, how do you handle that? Mixing migrations > and schema.rb is dangerous. Have you looked at seed-fu? http://w

[Rails] schema.rb gotcha and how to load default entries in DB

2008-09-10 Thread Fernando Perez
Hi list, I just wanted to let you know: 1) Yes you must check in the schema.rb into your SCM. 2) Yes you must use db:schema:load 3) Be careful schema.rb won't allow you to load "default" entries into the DB My question is, if I want to have for instance a default user inserted into DB such as a

[Rails] Re: Set Value of text_field after onchange

2008-09-10 Thread Frederick Cheung
On Sep 10, 6:34 pm, Pat <[EMAIL PROTECTED]> wrote: > Hi, > > I have a text field which is : > > <%= text_field( "select", "name" ,{:onchange => > "this.form.submit();"} ) %> > > I want to search database using value entered by user, and when search > results are displayed, I want to have text fi

[Rails] Set Value of text_field after onchange

2008-09-10 Thread Pat
Hi, I have a text field which is : <%= text_field( "select", "name" ,{:onchange => "this.form.submit();"} ) %> I want to search database using value entered by user, and when search results are displayed, I want to have text field retailn the value which was entered to have search results. I d

[Rails] Re: legacy database and set_table_name

2008-09-10 Thread Pardee, Roy
I'm probably out of my depth here, but since you're not doing any writing, I wonder if you could get a view together on the oracle side that UNIONS the data from your various ClaimExtra tables, and then point rails at that as the source 'table' for ClaimExtra? You could maybe even get fancy an

[Rails] Re: Rails on IIS7

2008-09-10 Thread Chris Judd
Drew wrote: > For anyone interested, this was resolved by compiling FastCGI against > VC6 instead of VC71, to match Ruby and the rest of the extensions > provided with the One-Click Installer. The wiki has been updated with > details. The link to the binary files is now gone, any clue where we co

[Rails] jquery slider

2008-09-10 Thread Felipe Vergara
a have a jquery slider a save the final values of the selection in javascript variables rank_1, rank_2, rank_3 I need to give this values to a controller how can i do that?? some help please!! thank you! -- Felipe Vergara Contesse Ingeniería Civil Industrial UC --~--~-~--~~-

[Rails] Re: How to model a polymorphic relationship?

2008-09-10 Thread Ar Chron
Search for "Rails double polymorphic" in Google... http://wiki.rubyonrails.org/rails/pages/ManytoManyPolymorphicAssociations http://blog.evanweaver.com/files/doc/fauna/has_many_polymorphs/files/README.html or just assume that everyone else will do the googling for you... -- Posted via http://ww

[Rails] legacy database and set_table_name

2008-09-10 Thread Reacher
I'm trying like crazy to wrap a rails app around a legacy oracle database. This app will not be mutating any data in the database, only viewing it. Here's a 30 second description of the "schema". There is a master table for a health care claim (I will call it claim_master), and this table has a

[Rails] Accessing storing url params as instance variables

2008-09-10 Thread Tom Eustace
Hi, I have an upload form, when a user submits i want to show them a loading page and once the upload is finished show them a success message. I'm new to ruby, can anyone recommend the best way to do this in ruby. Thanks T -- Posted via http://www.ruby-forum.com/. --~--~-~--~~---

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Rimantas Liubertas
> If you take that code (demo.html) and save it as demo.rhtml. Then view > demo.rhtml under rails using Firefox 3.0.1, you might see the the > resize problem. Nope, it is still 400px when serverd from rails (2.1.0) Regards, Rimantas -- http://rimantas.com/ --~--~-~--~~~-

[Rails] Re: How to model a polymorphic relationship?

2008-09-10 Thread Reiner Pittinger
Dear Ilan, although I just supplied just three basic models, my application already contains more than 15 different models that should be linked to each other. Some more examples: - I need a relationship between two documents ("Like: Document B is an attachment to Document A). - I need a rel

[Rails] Re: Includin a statement in each method

2008-09-10 Thread saljamil
I am assuming that the get_method_name just gets the name of the method that is currently running. In that case, since the logger statement in the setup methods, it will get that name which is not what you want. I don't know of any way not to include something in each method. You can create an ins

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread MalHayn
Hi Rimantas, Thanks for the response. The url (demo.html) will display properly at 400x400. If you take that code (demo.html) and save it as demo.rhtml. Then view demo.rhtml under rails using Firefox 3.0.1, you might see the the resize problem. This is the weirdness. The same code produces dif

[Rails] Re: Includin a statement in each method

2008-09-10 Thread Joel Saltzmanjoelh
def setup logger.info("\n\n STARTING #{get_method_name} \n\n") end gives me STARTING setup_without_fixtures in my log. If I put my logger in each method it prints fine. def test_account_create logger.info("\n\n STARTING #{get_method_name} \n\n") assert Account.create(:name => "Bob's Tofu H

[Rails] Re: Includin a statement in each method

2008-09-10 Thread Joel Saltzmanjoelh
saljamil wrote: > you first need to make sure that logger is defined in test_helper. If > you have not done that, you need to add: > def logger > RAILS_DEFAULT_LOGGER > end > in your test_helper.rb > > then in your unit or functional tests, you can add the logger message > as part of the se

[Rails] Re: Includin a statement in each method

2008-09-10 Thread saljamil
you first need to make sure that logger is defined in test_helper. If you have not done that, you need to add: def logger RAILS_DEFAULT_LOGGER end in your test_helper.rb then in your unit or functional tests, you can add the logger message as part of the setup method which runs once before

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Rimantas Liubertas
> Hi Guys, > > Thanks for the input. > > Rework the code to reduce the css error messages to 4, but problem > still remains. Embedded objects are reduce by about 91%. > > Here is the reworked code... > > http://www.clarions.com/test/rails_firefox_object_bug/demo.html Do you have that problem in t

[Rails] Re: Approach on handling Access Control List and Permissions

2008-09-10 Thread saljamil
I had the same requirement. I used a similar approach to your option 2 above. I then used the Rails.cache facility in Rails 2.1 to cache permitted actions at login for each user. I have the before filter fetch from cache and not from the DB. I also have an active record call back after save on the

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 9:40 AM, MalHayn <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > Thanks for the input. > > Rework the code to reduce the css error messages to 4, but problem > still remains. Embedded objects are reduce by about 91%. > > Here is the reworked code... > > http://www.clarions.com/

[Rails] Re: namespaced layouts?

2008-09-10 Thread Danimal
Somewhat of an answer, somewhat of a new question... It looks like layouts use namespacing, but "backwards" from everything else. In other words, given my namespaced "admin", It would look for layouts in: apps/views/layouts/admin/whatever.html.erb I'm wondering why that way and not: apps/views

[Rails] Re: counter implementation

2008-09-10 Thread Difei Zhao
Maurício Linhares wrote: > One thing to notice is that a loaded model WILL NOT be updated by this > call, if you have a model loaded and call this method to perform the > increment, the model that is already loaded will not be updated, you > will have to call "reload" on it to get the latest count

[Rails] Re: xmlhttprequest for updating

2008-09-10 Thread da991319
Hi Frederick, >format doesn't actually help you here: the ajax request is genuinely > requesting html. What you can do is > > if xhr? > ... > end what i should write if xhr? is true? something like: render :partial =>show, :id => @sample if i write that the def show is not call, neither show.

[Rails] Re: counter implementation

2008-09-10 Thread Maurício Linhares
One thing to notice is that a loaded model WILL NOT be updated by this call, if you have a model loaded and call this method to perform the increment, the model that is already loaded will not be updated, you will have to call "reload" on it to get the latest counter value. On Wed, Sep 10, 2008 a

[Rails] Re: counter implementation

2008-09-10 Thread Difei Zhao
Maurício Linhares wrote: > On Wed, Sep 10, 2008 at 1:42 PM, Difei Zhao > <[EMAIL PROTECTED]> wrote: >> Maur�cio proposed the increment_counter method, may I assume that is >> atomic? > > This method does something like this: > > "update model_table_name set counter_column = counter_column + 1 wh

[Rails] Re: counter implementation

2008-09-10 Thread Maurício Linhares
On Wed, Sep 10, 2008 at 1:42 PM, Difei Zhao <[EMAIL PROTECTED]> wrote: > Maurício proposed the increment_counter method, may I assume that is > atomic? This method does something like this: "update model_table_name set counter_column = counter_column + 1 where id = 'your row id' " So, it's up t

[Rails] Re: counter implementation

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 17:04, Maurício Linhares wrote: > > You should be doing it like this: > > Temp.increment_counter( :counter, id ) > > This will increment the property ":counter" for the model Temp with > "id", this column must have a default value of 0 (zero) or else this > call won't work. t

[Rails] Re: counter implementation

2008-09-10 Thread Difei Zhao
Jason Roelofs wrote: > On Wed, Sep 10, 2008 at 11:59 AM, Difei Zhao > <[EMAIL PROTECTED]> wrote: >> >> The implementation seems quite simple, but I am worrying about the >> race condition (if there are any, I do not know whether rails is >> thread-safe) since these statements may be interleaved.

[Rails] Re: counter implementation

2008-09-10 Thread Difei Zhao
Maurício Linhares wrote: > You should be doing it like this: > > Temp.increment_counter( :counter, id ) > > This will increment the property ":counter" for the model Temp with > "id", this column must have a default value of 0 (zero) or else this > call won't work. Thanks a lot! This look like

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread MalHayn
Hi Guys, Thanks for the input. Rework the code to reduce the css error messages to 4, but problem still remains. Embedded objects are reduce by about 91%. Here is the reworked code... http://www.clarions.com/test/rails_firefox_object_bug/demo.html When reviewing the two "source codes" output

[Rails] Re: Includin a statement in each method

2008-09-10 Thread Joel Saltzmanjoelh
Frederick Cheung wrote: > stick it in the setup method. > > Fred Would that just be setup logger.info("\n\n STARTING #{get_method_name} \n\n") -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: Includin a statement in each method

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 17:21, Joel Saltzmanjoelh wrote: > > I am running tests and I would like to include > > logger.info("\n\n STARTING #{get_method_name} \n\n") > > in the beginning of each method in my account_test.rb file. How > would I > do that without having to put it in each method?? sti

[Rails] Includin a statement in each method

2008-09-10 Thread Joel Saltzmanjoelh
I am running tests and I would like to include logger.info("\n\n STARTING #{get_method_name} \n\n") in the beginning of each method in my account_test.rb file. How would I do that without having to put it in each method?? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~--

[Rails] Re: Using the collect method to collect to a 2 dimensional array

2008-09-10 Thread Ilan Berci
Sijo, not sure, but looking at your code it seems you may want to do something like the following def self.get_email_ids_of_contacts(contact_id) contact = Contact.find_by_id(contact_id) contact.contact_email_addresses.find(:all, :conditions => []).map do |mail| [contact.name, mail.ema

[Rails] Re: Can't download files with send_data or send_file

2008-09-10 Thread Aditya Apte
Hello, I have a similar problem and I am using select helper alongwith observe_field. Any clues are greatly appreciated. View: <%= select('temp_data','choose', ["Spreadsheet","Flat Spreadsheet","Pipe-delimited","Flat Pipe-delimited"], {:selected => nil},{:id => "report_download_select"}) %>

[Rails] Approach on handling Access Control List and Permissions

2008-09-10 Thread elioncho
Hello, I am currently working on an app where I have at least 7 roles. I want to control all the permissions available for each role. Right now I have a users table, roles table and a joined table user_roles. I have 3 ideas in mind and will like to hear your opinion on both of them (and suggestio

[Rails] Re: counter implementation

2008-09-10 Thread Maurício Linhares
You should be doing it like this: Temp.increment_counter( :counter, id ) This will increment the property ":counter" for the model Temp with "id", this column must have a default value of 0 (zero) or else this call won't work. On Wed, Sep 10, 2008 at 12:59 PM, Difei Zhao <[EMAIL PROTECTED]> wro

[Rails] Re: counter implementation

2008-09-10 Thread Jason Roelofs
On Wed, Sep 10, 2008 at 11:59 AM, Difei Zhao <[EMAIL PROTECTED]> wrote: > > Greetings all, > > I have a model which holds a counter field, the field have to be > incremented frequently to record the access frequency of the specific > object: > > @obj = Temp.find(id) > @obj.counter += 1 > @obj.sav

[Rails] counter implementation

2008-09-10 Thread Difei Zhao
Greetings all, I have a model which holds a counter field, the field have to be incremented frequently to record the access frequency of the specific object: @obj = Temp.find(id) @obj.counter += 1 @obj.save The implementation seems quite simple, but I am worrying about the race condition (i

[Rails] Re: 1.1.6 bug? Recognition failed for "/rails/info/properties"

2008-09-10 Thread Hennry Jack
Bugs which haven't been patched, tested, or fixed. To resolve a bug, confirm it exists, fix it, and write tests to prove it. Attach your complete patch to the original ticket and prefix its summary with [PATCH]. hennry http://foreclosures.gov-auctions.org";>Foreclosed Home

[Rails] Re: Deploying rails in an intranet

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 16:21, Snaggy wrote: > > thank you all! > > let me ask one stupid thing... when I run webrick i get rails on > 0.0.0.0:3000 > if I do that on a server, can't I just connect to it inserting the > server IP and :3000? > That will work (don't forget to switch it to production mod

[Rails] Re: Deploying rails in an intranet

2008-09-10 Thread Snaggy
thank you all! let me ask one stupid thing... when I run webrick i get rails on 0.0.0.0:3000 if I do that on a server, can't I just connect to it inserting the server IP and :3000? I mean, can't I use webrick alone? Do I have to install apache/ mongrel? This app isn't that big, and won't get man

[Rails] Re: Deploying rails in an intranet

2008-09-10 Thread Christian Bryan
Deploying your app to an intranet isn't very different from deploying it to the whole internet. Your app doesn't seem like it's going to get an unreal amount of traffic, so worrying about load balancers and clusters isn't going to be worth your time. I'd take a simple route and install Ubuntu Ser

[Rails] Re: xmlhttprequest for updating

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 15:55, da991319 wrote: > > Hi Robert, > > I indeed did try with format.js. It occurs an error: template is > missing, Missing template samples/update.js.erb. > > as I say i already have a show template and show.js.rjs that is doing > everything necessary if def show is called

[Rails] Re: xmlhttprequest for updating

2008-09-10 Thread da991319
Hi Robert, I indeed did try with format.js. It occurs an error: template is missing, Missing template samples/update.js.erb. as I say i already have a show template and show.js.rjs that is doing everything necessary if def show is called by an AJAX request. that why i would like to call def show

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 7:51 AM, Conrad Taylor <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 7:32 AM, Frederick Cheung < > [EMAIL PROTECTED]> wrote: > >> >> >> On 10 Sep 2008, at 15:13, MalHayn wrote: >> >> > >> > Hi, >> > >> > Good points, but there is nothing different with content-type o

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 7:32 AM, Frederick Cheung < [EMAIL PROTECTED]> wrote: > > > On 10 Sep 2008, at 15:13, MalHayn wrote: > > > > > Hi, > > > > Good points, but there is nothing different with content-type or doc > > type or any of the code. And the stylesheets have been removed. > > > > > > I

[Rails] namespaced layouts?

2008-09-10 Thread Danimal
Hello! Is it just me or are layouts not namespaced automatically? For example, using the typical namespaced admin section, I have: apps/controllers/admin/users_controller.rb # for example apps/views/admin/users/index.html.erb I then added this: apps/views/admin/layouts/application.html.erb B

[Rails] Re: xmlhttprequest for updating

2008-09-10 Thread Robert Walker
> if @sample.update_attributes(params[:sample]) > flash[:notice] = 'Sample was successfully updated.' > respond_to do |format| > format.html {redirect_to(@sample)} > format.js > end > else > render :action => "edit" > end Oops, I take this back. It should be more like: # PUT /pe

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 15:13, MalHayn wrote: > > Hi, > > Good points, but there is nothing different with content-type or doc > type or any of the code. And the stylesheets have been removed. > > > I have posted the entire webpage code online so other can test for > themselves. > > http://www.clario

[Rails] Re: xmlhttprequest for updating

2008-09-10 Thread Robert Walker
> format.xml_http_request :get, "show",:id => @sample > May be i am not using correctly the xml_http_request function. You are correct. I don't know what xml_http_request is actually supposed to do, but this should read something more like: respond_to do |format| format.html { redir

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread MalHayn
Hi, Good points, but there is nothing different with content-type or doc type or any of the code. And the stylesheets have been removed. I have posted the entire webpage code online so other can test for themselves. http://www.clarions.com/test/rails_firefox_object_bug/index.html The webpage

[Rails] Re: how do i use a newly installed gem?

2008-09-10 Thread dino d.
SOLVED! The problem was that since the installer failed, I had to install without dependencies. Apparently, I forgot to manually install fastercsv, but instead of throwing a message like 'no fastercsv,' it said 'no such file to load.' Thanks for your help guys. dino On Sep 9, 5:36 pm, "dino d.

[Rails] xmlhttprequest for updating

2008-09-10 Thread da991319
Hello, I am updating an object with an AJAX form: view: <% remote_form_for(@sample, :update => "content2") do %> parameter: <%= select("sample","parameter",Parameter.find(:all).collect {|p| [p.description.gsub('_', ' '),p.id]},{},{:size => 4, :multiple => true}) %> <%= submi

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Rimantas Liubertas
> How does the html generated via rails and the static file differ. Is > it something like a different content-type or doc type is triggering a > change in browser behaviour? > > Fred Yes, I am thinking along the same lines. Most likely some CSS rule from rails stylesheet gets involved. Regards,

[Rails] Re: How to model a polymorphic relationship?

2008-09-10 Thread Ilan Berci
Reiner, My suggestion then is to come up with your classes first and then make a design. A very common pitfall is to design for something that "may" happen and then later face over engineered code.. In the late nineties, we called this the YAGNI principle which stood for "You Aint Going to N

[Rails] Re: problem with showing image

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 3:14 AM, Jay Pangmi < [EMAIL PROTECTED]> wrote: > > Hi I'm using <%= image_tag("nameofimage.png") %> to load image in my > page and picture is there and it loads very rarely but most of the time > (almost all the time) it doesn't. What can be the cause for it. Also I > trie

[Rails] Re: Need help in Ajax Pagination

2008-09-10 Thread Kiran Polawar
Sijo Kg wrote: > R U using will_paginate? Hi, I am using normal pagination code in controller as @photo_pages ,@photos = paginate_collection @profile_user,:per_page => 16,:page => @params[:page] and in view using the code above specified. Regards, kiran -- Posted via http://www.ruby-forum

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Conrad Taylor
On Wed, Sep 10, 2008 at 4:29 AM, MalHayn <[EMAIL PROTECTED]> wrote: > > There is a possible bug when using Firefox 3.0.1 under Rails 2.0.2 > with embedding objects. > > I discovered after upgrading to Firefox 3.0.1, embedded flash movies > will not display properly under Rails. The flash movies di

[Rails] Re: HowTo search a string for content?

2008-09-10 Thread Pardee, Roy
the others are right to point you to regular expressions--definitely worth learning. But to give you a fish, you can use String's [] method to check for an @ symbol. if my_string['@'] then # my_string has an @ in it. end HTH, -Roy -Original Message- From: rubyonrails-talk@goo

[Rails] Date informations lost

2008-09-10 Thread MR Damien
Hi all, I am trying to save a DateTime in the database (oracle). The field is "datetime" and the ruby object I am trying to save a DateTime. But once I save the object in the database, it's only saving the date (day, month and year) but drop the time (hh:mm). Did I miss something ? -- Posted

[Rails] Re: problem with showing image

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 12:50, Jay Pangmi wrote: > > thanks for the reply man but doesn't help. Firebug and things like that allow you to server responses for all of your requests. I suggest you look at that to find out why your images aren't loading. Fred > > -- > Posted via http://www.ruby-f

[Rails] Re: problem with showing image

2008-09-10 Thread Jay Pangmi
thanks for the reply man but doesn't help. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk

[Rails] Re: Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 12:29, MalHayn wrote: > > There is a possible bug when using Firefox 3.0.1 under Rails 2.0.2 > with embedding objects. > > I discovered after upgrading to Firefox 3.0.1, embedded flash movies > will not display properly under Rails. The flash movies display > cropped thus not

[Rails] Re: Need help in Ajax Pagination

2008-09-10 Thread Sijo Kg
R U using will_paginate? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com

[Rails] Re: Need help in Ajax Pagination

2008-09-10 Thread Kiran Polawar
[EMAIL PROTECTED] wrote: > hi All, > > i wants to implement ajax pagination but i am facing a lot of > problem , i found i lots of links on google but their is no > explanation like what object we have to pass and condition can any > body help me out in this concern pls i need your help as soon a

[Rails] Possible Bug: Firefox 3.0.1 - embedded objects

2008-09-10 Thread MalHayn
There is a possible bug when using Firefox 3.0.1 under Rails 2.0.2 with embedding objects. I discovered after upgrading to Firefox 3.0.1, embedded flash movies will not display properly under Rails. The flash movies display cropped thus not displaying the right and bottom sides of the movies. By

[Rails] How to get fleximage plugin work on edge?

2008-09-10 Thread Erik Dahlstrand
Hi all! I have developed an application during the last month as a personal rails learning project (I'm from .NET world). Now I want to make the site public. The application is developed using edge rails because I need the I18n features. The thing is that the fleximage plugin stopped working when

[Rails] Re: Deploying rails in an intranet

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 11:36, Snaggy wrote: > > First, I know nothing about web servers, ports, networks and stuff.. > I was comfortable with my webrick for development... > > Now, I developed an app for internal use in my company, we have a > server and about 50 computers in the network. I can hav

[Rails] Check if render's HTTP body was transmitted successfully

2008-09-10 Thread [EMAIL PROTECTED]
Hi there, I want to be sure, that the data I send via render is transmitted fully and successfully to the recipient. In other words I want to know if the TCP connection to the recipient was finished without error. Is there a way to get this information out of the rails framework? Thanks in advan

[Rails] Deploying rails in an intranet

2008-09-10 Thread Snaggy
First, I know nothing about web servers, ports, networks and stuff.. I was comfortable with my webrick for development... Now, I developed an app for internal use in my company, we have a server and about 50 computers in the network. I can have a virtual server for my app, with whatever OS I wan

[Rails] Re: problem with showing image

2008-09-10 Thread Frederick Cheung
On 10 Sep 2008, at 11:14, Jay Pangmi wrote: > > Hi I'm using <%= image_tag("nameofimage.png") %> to load image in my > page and picture is there and it loads very rarely but most of the > time > (almost all the time) it doesn't. What can be the cause for it. Also I > tried stille can't get th

[Rails] Re: Help: fastcgi connection refused

2008-09-10 Thread Giorgos Tsiftsis
Hi, You can also face this error if your ruby path in public/dispatch.fcgi is wrong. George -- 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

[Rails] problem with showing image

2008-09-10 Thread Jay Pangmi
Hi I'm using <%= image_tag("nameofimage.png") %> to load image in my page and picture is there and it loads very rarely but most of the time (almost all the time) it doesn't. What can be the cause for it. Also I tried stille can't get the picture though the picture is situated under "///nameofima

[Rails] Re: Find with includes, conditions on included tables, and limit

2008-09-10 Thread Artifact
I should metion this for the benefit of anyone else with the same problem: The problem disappears, ie. :include works, when I use mysql rather than sqlite3. On Sep 10, 9:35 am, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On 10 Sep 2008, at 09:11, Artifact wrote: > > > > > Aha, thanks for that,

  1   2   >