[Rails] How to pass something to a model with has_attachment?

2008-10-17 Thread Steffen Wenzel
Hi, being still quite new to Rails, Ruby and this whole cool programming stuff (and not having done my homework in studiying the basics) this problem is probably quite simple. But it still bugs me out as I have to finish the site. Like last month. I've used Advanced Rails Recipes (http://media.p

[Rails] Question on model and fields in form

2008-10-17 Thread Olexiy Prokhorenko
Hi there, Her is the thing. Let's say, I have model "Phonebook", which has two fields "phone_number" and "full_name". I also have view, with form which asks for "full_name" and (important here) couple of fields: phone_int phone_area phone_number phone_extension They all need to be concated li

[Rails] Convert Illustrator file to HTML or CSS for programming on Ruby?

2008-10-17 Thread carladeluxe
HI there, My graphic designer and my programmer are having a communications snafu, and it's my job to translate. The programmer is saying that if there's a simple conversion method to take web page designs created in Illustrator and convert them to HTML or CSS, it will save him about 50% of prog

[Rails] Re: has_many :through a belongs_to association

2008-10-17 Thread Walther Diechmann
Pratik Naik wrote: > @Walt Hey, sorry I got busy and couldn't look at this thread. @Pratik - no problem :) I will have to feel my way into this edge business (and not bag a bundle of plugins along on the ride) :D But thank you even so for caring and your time! @Martin Gamsjaeger Thank you to

[Rails] Re: best way to validate input values..

2008-10-17 Thread Jay Pangmi
Thanks guys for your suggestions. I have now moved all the validations to the model class and ended up with couple of question again. I've done like the following: MODEL CLASS: class Cart < ActiveRecord::Base valid

[Rails] Re: Documentation for building an XML-RPC service with Rails 2

2008-10-17 Thread helzer
Hi Pardee, I've ordered the book. It's still in Beta, so maybe if I ask really nice they'll add some meat there... Thanks, Amir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post t

[Rails] Re: activerecord :include

2008-10-17 Thread Mark James
Mark James wrote: > This may work: > > class Folder < ActiveRecord::Base >has_one :most_recent_note, :class_name => 'Note', >:foreign_key => :note_id, :conditions => >'notes.created_at = (select max(created_at) from notes)' > end > > folders = Person.find(1, :include

[Rails] Re: activerecord :include

2008-10-17 Thread Mark James
hiddenhippo wrote: > basically I've got a design which has a model describing, say a > folder, and within each folder I associate some notes. I've built my > models so that a folder can have many notes, and that a note belongs > to a folder. Now, a folder can belongs to a person, and a person >

[Rails] Re: Documentation for building an XML-RPC service with Rails 2

2008-10-17 Thread Pardee, Roy
Looks to me like there's about a half a page on XML-RPC, at the beginning of the chapter on ActiveResource--it's discussed as an alternative to ActiveResource. Not a ton there... -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of helzer S

[Rails] Re: 3 / 2 is 1?

2008-10-17 Thread Joshua Muheim
Thanks guys :-) -- 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 To unsubs

[Rails] Re: 3 / 2 is 1?

2008-10-17 Thread Craig Demyanovich
At least one of the numbers needs to be a float. Here's an example of script/console output: Loading development environment (Rails 2.1.1) >> 3/2 => 1 >> 3.0/2 => 1.5 >> 3/2.0 => 1.5 >> 3.0/2.0 => 1.5 In Ruby, division of integers returns only the integer part of the result. Craig --~--~---

[Rails] Re: 3 / 2 is 1?

2008-10-17 Thread Pardee, Roy
That's a common ruby gotcha. Division of integers results in an integer. To fix, convert one or both numbers to floats with .to_f or include a decimal place on the literal (e.g., 3.0/2) HTH, -Roy -Original Message- From: rubyonrails-talk@googlegroups.com [mailto:[EMAIL PROTECTED] On

[Rails] 3 / 2 is 1?

2008-10-17 Thread Joshua Muheim
Hi all Why is 3/2=1 in a Rais view? How can I get Rails to output 1.5 as the result? Thanks Josh -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Documentation for building an XML-RPC service with Rails 2

2008-10-17 Thread helzer
Hi, I keep running into brick walls when trying to find up to date information on how to build and text XML-RPC API for my application, running Rails 2. Anyone know if the 'web services' chapter for the Pragmatic "Agile Web Development With Rails Third Edition" is updated and contains reliable i

[Rails] ActionMailer template gets nil param from non-nil deliver_

2008-10-17 Thread Fritz Anderson
Rails 1.2.6 ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] =Summary: I pass a non-nil parameter to an ActionMailer class's deliver_* method. The corresponding * instance method for the ActionMailer gets a nil instead. Disaster ensues. Will someone please tell me what I'm doing wro

[Rails] JQuerry Select Box problem

2008-10-17 Thread Robert
Hi, http://i34.tinypic.com/n3rsso.jpg I'm trying to do this using jQuery (in RoR ) and i need some help... So let me explain it in a few steps. Lets say Selection Box 1 is list of Continets. I want to be able to fill Selection Box 2 (list of all countries on selected continent) by selecting a v

[Rails] Re: DB strategy - Lock Table?

2008-10-17 Thread Shagy Moe
I think I've solved it by using :lock in the find like this: spreadsheets = Spreadsheet.find(:all, :conditions => ["parent_id = ?", self.id], :lock => "FOR UPDATE") This tables uses acts_as_tree and originally I was just calling s

[Rails] TextMate Bundle using Gedit

2008-10-17 Thread jason white
Hello All,is it possible to use a textmate bundle in Gedit? I'm using Ubuntu 8.04 at the moment. thanks, Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s

[Rails] Re: InstantRails and SQLite

2008-10-17 Thread Norm
Is there something unique that SQLite has that forces you to use it with FluxBB? Could you just edit config/database.yml and make it use MySQL? If you have to use SQLite on InstantRails you might want to check out [EMAIL PROTECTED] (an InstantRails mail list). Good luck Norm CiriusMex wrot

[Rails] RoutingError from css background image url

2008-10-17 Thread sparky
In my css file, I have a css element that has a background image that's defined as background: url(/images/global/tab-arrow.gif) no-repeat 16px 8px ; This throws a Routing Error when an element with that class gets rendered ActionController::RoutingError (No route matches "/images/" with {:doma

[Rails] Re: DB strategy - Lock Table?

2008-10-17 Thread Frederick Cheung
On 17 Oct 2008, at 19:18, Shagy Moe <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have a process which creates a new object from a backgroundrb job. > This object is versioned and the version is based on the existing > objects in this table. For example, I've got a table called > spreadsheets

[Rails] Re: Modularize application

2008-10-17 Thread Daniel Moore
On Oct 16, 10:16 am, Alfredo Garcia lopez <[EMAIL PROTECTED] s.net> wrote: > Needings are: > *add,overwrite models,controllers,helpers methods > *add,overwrite views with possibility to render the overwritten view > from the new view.This is the most complex part because several modules > could o

[Rails] [ANN] Prawn 0.2.1, 0.2.2 (Fast, nimble PDF generator for Ruby)

2008-10-17 Thread Gregory Brown
Hi folks, A new release of Prawn is out, with some bug fixes and a couple backported features from edge. This release is API-compatible with 0.2.0, so please do upgrade! Release notes at: http://blog.majesticseacreature.com/archives/2008.10/prawn_0_2_1-2.html Enjoy! -greg -- Technical Blaag a

[Rails] Re: acts_as_versioned issues

2008-10-17 Thread Walter McGinnis
Really? We use acts_as_versioned with Rails 2.1 in Kete ( http://kete.net.nz/). We may have done some slight hacking, but shouldn't be too bad. You can see our version here: http://github.com/kete/kete/tree/master/vendor/plugins/acts_as_versioned You can see from http://github.com/kete/kete/tre

[Rails] Re: Generating a random number

2008-10-17 Thread Daniel Moore
How about something like: "%09d" % rand(10) Or... this way seems even better: Array.new(9){rand 10}.join Where 9 can be replaced by however many digits you want. -Dimo http://strd6.com/blog --~--~-~--~~~---~--~~ You received this message because you are

[Rails] DB strategy - Lock Table?

2008-10-17 Thread Shagy Moe
Hi all, I have a process which creates a new object from a backgroundrb job. This object is versioned and the version is based on the existing objects in this table. For example, I've got a table called spreadsheets and it has a column called version. Each version is incremental and when a new

[Rails] Re: has_many :through a belongs_to association

2008-10-17 Thread Roman Heinrich
Thanks a lot! Roman On Oct 17, 5:19 pm, Martin Gamsjaeger <[EMAIL PROTECTED]> wrote: > Hi all, > > I fixed this issue, it's available > athttp://github.com/snusnu/has_many_polymorphs/tree/master > > cheers > Martin > > On Oct 16, 3:46 pm, Roman Heinrich <[EMAIL PROTECTED]> wrote: > > > @Pratik:

[Rails] Re: interacting select_tags using onchange

2008-10-17 Thread Luma
sorry, I still didn't find a solution. I don't have much experience with javascript. Luma On 16 Okt., 18:10, Flo <[EMAIL PROTECTED]> wrote: > Hey, do you solved your problem or found a work-around? > > If so I'm interested in it because I do have a similar problem. > > Thanks. > Flo. --~--~-

[Rails] Re: Looking for any e-commerce frameworks

2008-10-17 Thread Wayne M
I'll look at that. I was also looking at Spree. Our current setup uses a bunch of different gateways, 3DSI, Authorize.net (I know this one is supported), and looking at ICVerify (which I've never heard of). On Oct 17, 1:09 pm, Patrick Sullivan <[EMAIL PROTECTED]> wrote: > Take a look at Substru

[Rails] Re: Looking for any e-commerce frameworks

2008-10-17 Thread Patrick Sullivan
Take a look at Substruct. I have used it for a few clients, and it's pretty easy to setup and manage. http://code.google.com/p/substruct/ On Friday 17 October 2008 11:52:33 Wayne M wrote: > I'm wondering if there are any decent e-commerce frameworks done in > Rails that are available for gene

[Rails] Looking for any e-commerce frameworks

2008-10-17 Thread Wayne M
I'm wondering if there are any decent e-commerce frameworks done in Rails that are available for general use. My company is looking at upgrading from our existing shoddy Classic ASP solution, and since I am learning Rails in my spare time I'm tempted to look at using it as a solution; right now w

[Rails] Re: SOAP4R connection to a secured link(https)

2008-10-17 Thread Hassan Schroeder
On Fri, Oct 17, 2008 at 3:03 AM, Pallavi Gawas <[EMAIL PROTECTED]> wrote: > I have been trying to connect to a secured link(https) which is > pointing to a wsdl file. I am using SOAP4R for this. But it is giving me > an exception which says " hostname was not match with the server > certificate"

[Rails] Invalid Response From an Upstream Server

2008-10-17 Thread doug
I have put together a Rails form-mailing application using Action Mailer and deployed it in a variety of instances without any problem. In my latest attempted deployment, however, I find that submitting the form results in the following error: The proxy server received an invalid response from an

[Rails] Re: form_for() question

2008-10-17 Thread infinteVerve
What do you have in your posts_controller? On Oct 17, 12:00 pm, "Zack K." <[EMAIL PROTECTED]> wrote: > Well now i have it working so i don't get an error, but it doesn't > submit the information into the server. > > On Oct 17, 10:56 am, Andrew Porter <[EMAIL PROTECTED]> wrote: > > > Zack K. wrote

[Rails] Re: Group Authentication Plugin

2008-10-17 Thread Prateek
Hi Bharat, I am aware of restful_authentication, and have used it quite a bit. But it doesn't completely satisfy my current need. I want the logged in user to be able to add more user and have a dedicated login URL for every user. Thanks, Prateek --~--~-~--~~~---~--~-

[Rails] Re: Raw SQL from a Rake Task

2008-10-17 Thread Joe Peck
Joe Peck wrote: > Roy Pardee wrote: >> Can you just shell out to whatever command-line tool your database >> supports for executing large sql files? > > Yeah, I can. Now I ran into good ol' Error 1136: Column count doesn't > match value count at row 1 > > It really looks to me like it should

[Rails] Re: form_for() question

2008-10-17 Thread Zack K.
Well now i have it working so i don't get an error, but it doesn't submit the information into the server. On Oct 17, 10:56 am, Andrew Porter <[EMAIL PROTECTED]> wrote: > Zack K. wrote: > > How do i set the route? > > Sorry, i'm new to Rails > > You can only use named routes (which form_for uses

[Rails] Re: Removing values from a select (drop-down) box

2008-10-17 Thread Pardee, Roy
> On 16 Oct 2008, at 22:44, Neal L <[EMAIL PROTECTED]> wrote: > > > > > That sort of worked, it returned an array of true, false values > > corresponding to !c.selected. That did help me figure out the > > solution though. Here's what worked: > > > > @account.clients.map{ |c| !c.can_edit(@unit)

[Rails] Re: has_many :through a belongs_to association

2008-10-17 Thread Martin Gamsjaeger
Hi all, I fixed this issue, it's available at http://github.com/snusnu/has_many_polymorphs/tree/master cheers Martin On Oct 16, 3:46 pm, Roman Heinrich <[EMAIL PROTECTED]> wrote: > @Pratik: Thanks! I created a github project to showcase the issue: > > http://github.com/mindreframer/hmp_and_edg

[Rails] Cutting Edge Technologists wanted

2008-10-17 Thread Jay S'duc
Hi All, If you have Ruby on Rails experience and fancy a change of scenery then feel free to call me on 020 8254 7487. I am excellent at finding great RoR Developers new opportunities. Get in touch -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: form_for() question

2008-10-17 Thread Andrew Porter
Zack K. wrote: > How do i set the route? > Sorry, i'm new to Rails You can only use named routes (which form_for uses when you pass it an AR object) if you declare them. This is done with the map.resource and map.resources methods in your config/routes.rb file. Read up on named routes. --~-

[Rails] Re: Raw SQL from a Rake Task

2008-10-17 Thread Joe Peck
Roy Pardee wrote: > Can you just shell out to whatever command-line tool your database > supports for executing large sql files? Yeah, I can. Now I ran into good ol' Error 1136: Column count doesn't match value count at row 1 It really looks to me like it should work, but I'm sure there's som

[Rails] RFP for development & design of New Website

2008-10-17 Thread Nicole
The Pennsylvania Land Trust Association (PALTA) seeks to hire a contractor or contractors to complete (1) graphic design and (2) development of website infrastructure for a new website, ConservationTools.org. PALTA intends to select a contractor or contractors from among candidates responding to t

[Rails] Re: form_for() question

2008-10-17 Thread Zack K.
How do i set the route? Sorry, i'm new to Rails On Oct 17, 10:36 am, Andrew Porter <[EMAIL PROTECTED]> wrote: > Zack K. wrote: > > Well right now i'm currently trying to make a form that posts > > information into my database. I'm using the form_for function, but > > when i run the server and go

[Rails] Re: form_for() question

2008-10-17 Thread Andrew Porter
Zack K. wrote: > Well right now i'm currently trying to make a form that posts > information into my database. I'm using the form_for function, but > when i run the server and go to the page and get this error: > > undefined method `posts_path' for # You have no route for posts declared. --~--~

[Rails] form_for() question

2008-10-17 Thread Zack K.
Well right now i'm currently trying to make a form that posts information into my database. I'm using the form_for function, but when i run the server and go to the page and get this error: undefined method `posts_path' for # So i have no idea what i'm doing wrong, here is the code for the form:

[Rails] Re: Generator attributes

2008-10-17 Thread Andrew Porter
Heinz Strunk wrote: > Hello, > > I'm currently implenting a ERM diagram and neither the Rails API nor > Google could help me. I've got columns like ENUM('M', 'F'), VARCHAR(2) > and TINYINT and I can't find any attribute types that fit mine. Is there > any possiblity to add columns with these type

[Rails] Re: best way to validate input values..

2008-10-17 Thread athem
On Oct 17, 4:55 am, Andrew Porter <[EMAIL PROTECTED]> wrote: > Jay Pangmi wrote: > > you specific problem here is - > > ... > > > rescue > >redirect_to_booking("Invalid input.") > > end > > You render here > > > if camp_loc.blank? || nights.blank? || parents.blank? > > redirect_to_booki

[Rails] Re: best way to validate input values..

2008-10-17 Thread athem
On Oct 17, 4:55 am, Andrew Porter <[EMAIL PROTECTED]> wrote: > Jay Pangmi wrote: > > you specific problem here is - > > ... > > > rescue > >redirect_to_booking("Invalid input.") > > end > > You render here > > > if camp_loc.blank? || nights.blank? || parents.blank? > > redirect_to_booki

[Rails] Generator attributes

2008-10-17 Thread Heinz Strunk
Hello, I'm currently implenting a ERM diagram and neither the Rails API nor Google could help me. I've got columns like ENUM('M', 'F'), VARCHAR(2) and TINYINT and I can't find any attribute types that fit mine. Is there any possiblity to add columns with these types (like: " t.string :name" but e

[Rails] Re: Ruby on Rails Development Services

2008-10-17 Thread Thorsten Müller
> Do any other regulars on this forum agree/disagree? Agree. Had the same thought, when I first recognized this post. I think it's ok, if somebody adds a signature to his answers, like some people do, then it's a kind of small bonus for giving good answers. Job postings are ok too. But this kind

[Rails] Re: Ruby on Rails Development Services

2008-10-17 Thread Shandy Nantz
I agree, this is not the place for this. I don't job listings, but not this. Please delete this posting. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal

[Rails] Re: Group Authentication Plugin

2008-10-17 Thread Bharat
You may want to look at restful_authentication plugin. Before that, I would highly recommend that you go through learningrails.com podcasts and screencasts here: http://www.buildingwebapps.com/podcasts Screecast 11 explains in detail how to use the restful_authentication plugin. Bharat --~--~

[Rails] Re: Where to place the session variable to access it in mode

2008-10-17 Thread Robert Walker
> self.sd_ticket.update_attribute("modified_by_id",#here I need value I get the feeling from this line that you are confusing the responsibilities of the Model-View-Controller. Yes, there has been much blogged about skinny controllers and fat models. However, this does not mean you should y

[Rails] Re: mac vs windows - why is windows soooo slow?

2008-10-17 Thread Brian Hogan
I'm the one who went on record in "Deploying Rails Applications". Rails isn't slow on Windows - Ruby is. It was horribly slow almost four years ago when I started, and it's slow now, although it's faster because our CPUs have gotten faster. I spent a good majority of my Rails career working on th

[Rails] Re: How to best start from scratch implementing a ERM diagram?

2008-10-17 Thread Daniel Bush
Heinz Strunk wrote: > Hey people, > > I'm starting a new project and just finished creating the ERM diagram > with about 30 tables. There are quite some tables with foreign keys so > I'm not sure how to start creating the controllers/models. > How should I start creating controllers/models? Shoul

[Rails] Re: Ruby on Rails Development Services

2008-10-17 Thread Ar Chron
> Do any other regulars on this forum agree/disagree? Personally, I'd like to see any advertisements deleted right out of the forum, with a nastygram sent back to the poster that re-stated the policy and "do it again, and we'll block your IP"... but that's just my opinion. -- Posted via http:

[Rails] Group Authentication Plugin

2008-10-17 Thread Prateek
Hello, I am currently in need of an authentication system where one user logs in and the adds other users and passwords from his setting and then those people can login. How can I do something like that? Is there a plugin existing for it? Also how can I have them login at http://myappname.com/us

[Rails] Re: best way to validate input values..

2008-10-17 Thread Andrew Porter
Jay Pangmi wrote: you specific problem here is - ... > rescue >redirect_to_booking("Invalid input.") > end You render here > if camp_loc.blank? || nights.blank? || parents.blank? > redirect_to_booking("Fields with '*' are required fields.") > elsif (nights.to_i > 2) || ((parents.to

[Rails] Re: best way to validate input values..

2008-10-17 Thread Rob Lacey
the "render or redirect called multiple times" error is because you haven't called 'return' after you called 'render' or indeed 'redirect_to'. It doesn't actually do the render or redirect immediately. It only occurs after the method has returned. RobL Jay Pangmi wrote: > Hi, I have a form th

[Rails] Re: best way to validate input values..

2008-10-17 Thread Rob Lacey
I wouldn't do any vaildation in the controller, its messy and not ideal. I'd have some kind of 'Booking' object which presumably is what you are adding to your cart and validate it inside that using the rails validation helpers. RobL Jay Pangmi wrote: > Hi, I have a form that submits values f

[Rails] Re: Where to place the session variable to access it in model

2008-10-17 Thread Daniel Bush
Sijo Kg wrote: > Hi > I have the model SDTicket and SDCi > SDTicket > has_many :service_desk_cis > > SDCi > after_save :update_sd_ticket > belongs_to :sd_ticket > def update_sd_ticket > self.sd_ticket.update_attribute("modified_by_id",#here I need value > from session) > end > > I have a

[Rails] best way to validate input values..

2008-10-17 Thread Jay Pangmi
Hi, I have a form that submits values from text fields and a check box. The values posted are: camp location name, number of nights, number of parents, number of children, value from the check box "family claim". Where camp name can't be nil, nights can't be more than 2, parents and children toget

[Rails] Re: Setting up Fleximage

2008-10-17 Thread Manjula
Hi, In your view (new.html.erb) file This line <% form_for @photo, :html => { :multipart => true } do |f| %> should be like below <% form_for @photo, :url=>{:action=>'ACTIONNAME', }, :html => { :multipart => true } do |f| %> i.e give more argument :url=>{} to form_for To overcome "undefined m

[Rails] Re: acts_as_versioned issues

2008-10-17 Thread Freddy Andersen
The acts_as_versioned plugin is not compatible with rails 2.1 as I understand. You should look at version_fu.. http://github.com/jmckible/version_fu/tree/master --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Rub

[Rails] How to best start from scratch implementing a ERM diagram?

2008-10-17 Thread Heinz Strunk
Hey people, I'm starting a new project and just finished creating the ERM diagram with about 30 tables. There are quite some tables with foreign keys so I'm not sure how to start creating the controllers/models. How should I start creating controllers/models? Should I first create all tables with

[Rails] Where to place the session variable to access it in model

2008-10-17 Thread Sijo Kg
Hi I have the model SDTicket and SDCi SDTicket has_many :service_desk_cis SDCi after_save :update_sd_ticket belongs_to :sd_ticket def update_sd_ticket self.sd_ticket.update_attribute("modified_by_id",#here I need value from session) end I have a user controller in that session[:id] = cur

[Rails] Re: activerecord :include

2008-10-17 Thread Frederick Cheung
On 17 Oct 2008, at 11:27, hiddenhippo wrote: > folders = Person.find(1,:include=>[:folders]) > > however, what I also want to do is display the most recent note > against each folder. Although I can do this by simply adding the > notes into my include, > > folders = Person.find(1,:include=>[:fol

[Rails] Re: Seach users to invite, how ineficient is what I use?

2008-10-17 Thread Pod Caster
Any comments anyone? I guess my code is perfect otherwise 8-) Maybe I didn't formulate the right question... Regards -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] activerecord :include

2008-10-17 Thread hiddenhippo
basically I've got a design which has a model describing, say a folder, and within each folder I associate some notes. I've built my models so that a folder can have many notes, and that a note belongs to a folder. Now, a folder can belongs to a person, and a person therefore has many folders.

[Rails] Re: Ruby on Rails Development Services

2008-10-17 Thread Pau Cor
Cognitation Inc wrote: > Cognitation provides agile Ruby on Rails development services and > web/technology strategy consulting. I don't really think this is appropriate for this mailing list. Especially since it was posted via Ruby-Forum.com which clearly says, "Attention: posting any kind of

[Rails] SOAP4R connection to a secured link(https)

2008-10-17 Thread Pallavi Gawas
Hi I have been trying to connect to a secured link(https) which is pointing to a wsdl file. I am using SOAP4R for this. But it is giving me an exception which says " hostname was not match with the server certificate". I really cant figure out what is the problem. Would like to know how to go ab

[Rails] Re: Importing / Parsing Large Excel Files ?

2008-10-17 Thread [EMAIL PROTECTED]
I'm running a Linux machine, so I think WIN2OLE and DBI libraries are not an option. On Oct 16, 10:45 pm, "Pardee, Roy" <[EMAIL PROTECTED]> wrote: > Other options include ruby's WIN32OLE and DBI libraries.  For the former, > you'll have to be running on a machine w/excel installed. You'd use the

[Rails] Re: Searching parent objects and associated objects with one search

2008-10-17 Thread Mark James
Yogi wrote: > Three simple models setup with :through association > > > Person > has_many :readings > has_many :books, :through => :readings > > > Reading > belongs_to :person > belongs_to :book > > > Book > has_many :readings > has_many :persons, :through

[Rails] Add fixtures Class mothodes

2008-10-17 Thread [EMAIL PROTECTED]
Dear All I am using fixtures to load data into my program. But when loading data into the table later, I use: directory = File.join(File.dirname(__FILE__), "data/2007") Fixtures.create_fixtures(directory, "filename") The problem with the "create_fixtures" methode is that it moves all the

[Rails] Re: How to deal with these 3 model's association?

2008-10-17 Thread Patrick Sullivan
A subcategory is always a child of a category. Lets set up your associations as such. It will use only one db column instead of two. Each item will belong to a subcategory; each subcategory will belong to a category. It will look something like this: Category /\ Subcategories /|

[Rails] Re: link_to + image_tag

2008-10-17 Thread mahmoud said
I don't think i really get it... do u mean u want to have both the image and the text included in the link??? if it is so, simply concatenate those as following <%= link_to image_tag(image.filename,:size=>'110x85') + "Pass" , {:action=>'thumb_crop', :controller=>'light',:id=>image.id} %> keep i

[Rails] Re: 2 Models: Same name, different namespace => Problems

2008-10-17 Thread Frederick Cheung
On Oct 17, 8:28 am, Florian Dütsch <[EMAIL PROTECTED]> wrote: > Frederick Cheung wrote: > > On 16 Oct 2008, at 12:17, Florian Dütsch wrote: > > >>> (see > > > the whole const_missing autoloading thing has a number of quirks. > > Namespaced models aren't used very often, at least in the past ther

[Rails] InstantRails and SQLite

2008-10-17 Thread CiriusMex
Hy, I'm using InstantRails for my RoR developments and it is really great. However I have a little problem since a few days. Here is the situation, I'm using InstantRails 2.0 with PHP 5.2.6 (I upgraded following the InstantRails procedure). I'm using MySQL as a database for my application but rec

[Rails] Searching parent objects and associated objects with one search

2008-10-17 Thread Yogi
Three simple models setup with :through association Person has_many :readings has_many :books, :through => :readings Reading belongs_to :person belongs_to :book Book has_many :readings has_many :persons, :through => :readings I want to search

[Rails] acts_as_versioned issues

2008-10-17 Thread Bob Aman
I'm in the midst of an upgrade from Rails 2.0.2 to 2.1.1. We were using an older version of acts_as_versioned and after upgrading both Rails and acts_as_versioned we have 146 tests failing, mostly acts_as_versioned related. [snip the 140 or so identical failing tasks] 145) NoMethodError in 'Task

[Rails] Re: How to Catch a Status 401 with htpasswd?

2008-10-17 Thread Patrick Sullivan
Sorry for replying twice... caught this after I sent the first one. All of your error classes are in ./lib/htpasswd/class_methods.rb: class Error < StandardError; end class HeaderNotFound < Error; end class UnknownSchemeError < Error; end class NotAuthorizedError < Error

[Rails] Re: redirect for render_component

2008-10-17 Thread Patrick Sullivan
Ditch the component. Whatever you're wanting to display with "myaction", work it in to the view with partials or as the view itself. A cleaner way of doing this is by using a before filter in "mycontroller". Create an action that will check for the presence of session, and call it as a before

[Rails] Re: How to Catch a Status 401 with htpasswd?

2008-10-17 Thread Patrick Sullivan
In ./lib/htpasswd/auths/base.rb I found two exceptions that are raised for an invalid account and password: Htpasswd::UnknownUserAccount and Htpasswd::IncorrectPassword. Try rescuing the latter. See if that does the trick. On Thursday 16 October 2008 19:24:03 Mm Zz wrote: > If anyone has a su

[Rails] Re: 2 Models: Same name, different namespace => Problems

2008-10-17 Thread Florian Dütsch
Frederick Cheung wrote: > On 16 Oct 2008, at 12:17, Florian Dütsch wrote: > >>> (see >> > the whole const_missing autoloading thing has a number of quirks. > Namespaced models aren't used very often, at least in the past there > have been a number of edge cases. > > Fred Thanks Fred! Should I

[Rails] Re: link_to + image_tag

2008-10-17 Thread Xavier Noria
On Fri, Oct 17, 2008 at 8:42 AM, Lost Warrior <[EMAIL PROTECTED]> wrote: > > i want to integrated link_to with image_tag > > before i did link_to with image_tag like this > > <%=link_to image_tag(image.filename > ,:size=>'110x85'),{:action=>'thumb_crop',:controller=>'light',:id=>image.id},:class=>