[Rails] Re: Trouble sending email image attachment with rails

2011-01-21 Thread Jim Burgess
> Content type is JPEG. File you're reading is PNG. Yeah, I noticed this too, but according to the book I'm reading this should work. I tried sending a jpg as an attachment (instead of a png), but with the same result. I also tried: attachment :content_type => "image/png", :body => File.read(

[Rails] Re: Problem with relative URLs and AJAX requests.

2011-01-21 Thread Marnen Laibow-Koser
Kai Schlamp wrote in post #976711: > Uuups, I just found out that HTML links behave the same way ... it > seems I am too pampered with Rails link helpers ;-) Apparently so. If you don't understand relative URLs, you have no business doing Web development. > But I still wonder > what the easiest

[Rails] Re: Rails: Developing on Win7?

2011-01-21 Thread Marnen Laibow-Koser
Ben Giordano wrote in post #976696: > Looking to learn Rails but hoping to stick with Win7/xp as all of the > machines I work on run one of those two OSs. Would hate to be stuck to > my laptop for development b/c its the only machine I have running > ubuntu. Am I shooting myself in the foot by tryi

Re: [Rails] Re: - Model Inheritance

2011-01-21 Thread Pedro Bernardes
This is exactly it, I'm trying to add the topics behavior to the default behavior of universities and University.all just returns [] How do I change the University? I was unable to find references to it. 2011/1/21 Frederick Cheung > > > On Jan 21, 10:03 pm, Pedro Bernardes wrote: > > Hi, I'm n

Re: [Rails] Rails: Developing on Win7?

2011-01-21 Thread jason white
I haven't had a chance to try this out, but it looks very promising. http://railsinstaller.org/ it was featured in an article on Ruby Inside http://www.rubyinside.com/rails-installer-ruby-and-rails-on-windows-in-a-single-install-4201.html On Fri, Jan 21, 2011 at 5:05 PM, David Kahn wrote: > > >

[Rails] Re: Problem with relative URLs and AJAX requests.

2011-01-21 Thread Kai Schlamp
Uuups, I just found out that HTML links behave the same way ... it seems I am too pampered with Rails link helpers ;-) But I still wonder what the easiest way would be to build correct URLs for Javascript then. On Jan 22, 3:01 am, Kai Schlamp wrote: > Hm, that really sounds unhandy. As mentioned,

[Rails] Re: Problem with relative URLs and AJAX requests.

2011-01-21 Thread Kai Schlamp
Hm, that really sounds unhandy. As mentioned, I can simply use link and the "profile" gets appended to the full url. It doesn't matter in that case if there is a trailing slash or not. Why does Javascript has that problem and standard HTML not?! Does someone know of a good URL library for Javascrip

Re: [Rails] Rails: Developing on Win7?

2011-01-21 Thread David Kahn
On Fri, Jan 21, 2011 at 6:06 PM, Ben Giordano wrote: > Looking to learn Rails but hoping to stick with Win7/xp as all of the > machines I work on run one of those two OSs. Would hate to be stuck to > my laptop for development b/c its the only machine I have running > ubuntu. Am I shooting myself i

[Rails] Re: where does 'bundle install' store executables?

2011-01-21 Thread Frederick Cheung
On Jan 20, 7:32 pm, Fearless Fool wrote: > This should be an easy one: where does 'bundle install' store > executables, e.g. rspec and annotate? > > I ask because, in my case, the executables are getting written to: > >   ${DEVROOT}/usr/lib/ruby/gems/1.9.1/bin/ > > rather than (what I'd expect):

[Rails] Rails: Developing on Win7?

2011-01-21 Thread Ben Giordano
Looking to learn Rails but hoping to stick with Win7/xp as all of the machines I work on run one of those two OSs. Would hate to be stuck to my laptop for development b/c its the only machine I have running ubuntu. Am I shooting myself in the foot by trying to learn rails on windows? -- You recei

[Rails] Re: - Model Inheritance

2011-01-21 Thread Frederick Cheung
On Jan 21, 10:03 pm, Pedro Bernardes wrote: > Hi, I'm new to this list and to rails, so I'm sorry if this subject is > repetead or too obvious. > > I have two models: Topic and University, both in production. I want to make > University to inherit from Topic, but when I do this: > >       Univer

[Rails] - Model Inheritance

2011-01-21 Thread Pedro Bernardes
Hi, I'm new to this list and to rails, so I'm sorry if this subject is repetead or too obvious. I have two models: Topic and University, both in production. I want to make University to inherit from Topic, but when I do this: University < Topic My universities data just disapear (and reape

Re: [Rails] Problem with relative URLs and AJAX requests.

2011-01-21 Thread Philip Hallstrom
> I have a Rails app (3.0.3) that uses jQuery (1.4.4) to do some AJAX > requests. For example, when doing a AJAX request on a page like > "http://localhost:3000/users/3"; with > $("div#profile_box").load("profile"); > the browser always tries to fetch from "http://localhost:3000/users/ > profile".

[Rails] Problem with relative URLs and AJAX requests.

2011-01-21 Thread Kai Schlamp
Hello. I have a Rails app (3.0.3) that uses jQuery (1.4.4) to do some AJAX requests. For example, when doing a AJAX request on a page like "http://localhost:3000/users/3"; with $("div#profile_box").load("profile"); the browser always tries to fetch from "http://localhost:3000/users/ profile". It s

Re: [Rails] Trouble sending email image attachment with rails

2011-01-21 Thread Philip Hallstrom
On Jan 21, 2011, at 2:22 PM, Jim Burgess wrote: > Hi, > > I'm trying to use ActionMailer to send an image as an attachment to an > email. Here's my code: > > class ContactMailer < ActionMailer::Base > def message(sent_at = Time.now) >from 'b...@example.com' >recipients 'j...@example.co

[Rails] Preventing AR from appending fully qualified database name to query

2011-01-21 Thread Joe Martin
I'm developing a small app utilizing SQL Server 2008 for some testing. Along with the local database, I'm designing the app to query another database, which is another SQL Server db linked to my local MSSQL installation. When querying this second, linked database, I must use the fully qualified na

[Rails] Trouble sending email image attachment with rails

2011-01-21 Thread Jim Burgess
Hi, I'm trying to use ActionMailer to send an image as an attachment to an email. Here's my code: class ContactMailer < ActionMailer::Base def message(sent_at = Time.now) from 'b...@example.com' recipients 'j...@example.com' subject 'New message' sent_on sent_at body {}

Re: [Rails] Re: validates_presence_of problem

2011-01-21 Thread Colin Law
On 21 January 2011 21:22, abdelkarim wrote: > hello thank you for your reply Please don't top post, it makes it difficult to follow the thread. Insert your reply at appropriate points in previous message. Thanks > > i will explain to you a little more the problem : > > i created a scafold : > >

Re: [Rails] VARCHAR becomes BINARY

2011-01-21 Thread Ants Pants
On 21 January 2011 21:41, Rob Biedenharn wrote: > On Jan 21, 2011, at 2:56 PM, Ants Pants wrote: > > Hello all, > > I have a strange one here but there's probably a very simple solution > (though I've been unable to google it). > > I have a varchar(100) column called name (t.string :name, :limit

[Rails] Re: validates_presence_of problem

2011-01-21 Thread abdelkarim
hello thank you for your reply i will explain to you a little more the problem : i created a scafold : ./script/generate scaffold Zone name:string interface:string description:string all works fine . than i changed <%= f.text_field :interface %> to <%= f.select :interface , @table_Interfaces

Re: [Rails] VARCHAR becomes BINARY

2011-01-21 Thread Rob Biedenharn
On Jan 21, 2011, at 2:56 PM, Ants Pants wrote: Hello all, I have a strange one here but there's probably a very simple solution (though I've been unable to google it). I have a varchar(100) column called name (t.string :name, :limit => 100, :null => false). I have a validates_uni

[Rails] Re: Regex, size check inside a Controller's method.

2011-01-21 Thread Marnen Laibow-Koser
t.pickett66 wrote in post #976562: > On Jan 21, 12:05am, CuriousNewbie wrote: >> >> But that errors, any ideas? I'm not sure if I'm doing the REGEX >> correctly, could use some regex help. > > First, I agree with Marnen that this should be done in the model but I > disagree that the regexp is form

[Rails] VARCHAR becomes BINARY

2011-01-21 Thread Ants Pants
Hello all, I have a strange one here but there's probably a very simple solution (though I've been unable to google it). I have a varchar(100) column called name (t.string :name, :limit => 100, :null => false). I have a validates_uniqueness_of :name, :scope => :event_group_id, :ca

[Rails] Re: Can't install mongrel with ruby 1.9.2p136

2011-01-21 Thread Robert Walker
Marnen Laibow-Koser wrote in post #976429: >> I use passenger standalone for the following reasons: >> >> 1. It's not WebBrick. > > Why is that an advantage? If you don't see any advantage, then why did you choose Mongrel? >> 2. It's not Mongrel (i.e. it wasn't created by Zed Shaw). > > Why is th

[Rails] Re: RSpec / Cucumber painfully slow Rails 3 OSX

2011-01-21 Thread Arailsdemo A.
> But don't you always need to do that? Isn't that the task that clears > out the test DB? Or is that not an issue since you're (hopefully) > running your specs transactionally? As far as I can tell, the difference between 'rake spec' and 'rspec spec' is 'db:test:prepare'. When all tests pass w

[Rails] How to add dynamics routes in my app

2011-01-21 Thread luya
Hi, I Want to add dynamics routes in my App( She's in Rails 3 ) , Indeed my objective is to load dynamicaly routes because of user action. I've already make works the solution to open and inject code into route.rb But it seems not clean in my opinion? Sorry for my english Thx -- You received th

[Rails] Re: Regex, size check inside a Controller's method.

2011-01-21 Thread t.pickett66
> class User < AR::B >   INVALID_EMAILS = %w(gmail.com hotmail.com) >   def self.valid_email?(email) >      reg = Regexp.new(INVALID_EMAILS*'|') # *'string' is an alias > for .join('string') use whichever you preffer >      matches = reg.match(email) >      return matches == 0 >   end > end > A cou

[Rails] HOT BABES

2011-01-21 Thread SAHITHI
DEEPIKA PADUKONE HOT VIDEOS http://karomasti9.blogspot.com/2011/01/deepika-padukone.html HOT ARCHANA STILLS http://karomasti9.blogspot.com/2011/01/archana.html DEEKSHA SETH HOT WALLPAPERS http://karomasti9.blogspot.com/2011/01/deeksha-seth.html

Re: [Rails] What's the rails way to display data from multiple models on one page

2011-01-21 Thread Walter Lee Davis
On Jan 21, 2011, at 1:49 PM, Luke wrote: Hi there, I'm working on a little portfolio-site to get to know rails a little better. On this site I have a blog, a gallery (my portfolio) and other stuff for which each I created a model. On the start-page I want to show a bit of everything - so

[Rails] Re: File Column open tmp file

2011-01-21 Thread djangst
Can you use one of the attachment libraries (like Paperclip)? If not, you might still be able to find some inspiration there. > and i need to do some processing first and then add it to the model, any > suggestions? If you're doing image processing check out ImageMagick (also works with Papercli

[Rails] What's the rails way to display data from multiple models on one page

2011-01-21 Thread Luke
Hi there, I'm working on a little portfolio-site to get to know rails a little better. On this site I have a blog, a gallery (my portfolio) and other stuff for which each I created a model. On the start-page I want to show a bit of everything - some of the recent blog-entries, some pictures fro

[Rails] Re: File Column open tmp file

2011-01-21 Thread John Butler
Garrett Lancaster wrote in post #976554: > Should be able to use .tempfile() > > Garrett Lancaster thanks, have that working now. What i really need is to be able to add that file to a model in the controller, the field is a file column field. I know it generally comes from a form and is saved

[Rails] SENIOR SOFTWARE ENGINEER (RUBY ON RAILS)

2011-01-21 Thread Danny!
Job Title: SENIOR SOFTWARE ENGINEER (RUBY ON RAILS) Company: Strategi LLC Type of Job: Full Time Location: San Mateo, CA Salary: Competitive Job Description: Our client is seeking a software engineer to develop an en

[Rails] Re: Regex, size check inside a Controller's method.

2011-01-21 Thread t.pickett66
On Jan 21, 12:05 am, CuriousNewbie wrote: > Hello, I'm working to create a method in my controller to check an > email to see if the email's domain is acceptable. I want to prevent > gmail and hotmail for certain reasons. Here's what I have so far: > > controller: >     if valid_email_domain(email

Re: [Rails] Webrick not giving me any output

2011-01-21 Thread Walter Lee Davis
On Jan 21, 2011, at 6:40 AM, Jim Burgess wrote: Hi, Webrick has stopped giving me any output as to what it is doing. In the past it would show me what was going on internally as I navigated around my rails app (e.g it would show me any MySQL queries performed or if a template was missing

Re: [Rails] File Column open tmp file

2011-01-21 Thread Garrett Lancaster
Should be able to use .tempfile() Garrett Lancaster John Butler January 21, 2011 8:50 AM Does anyone know how to open a file like the below? "Filedata"=>#} file_column is used to

[Rails] File Column open tmp file

2011-01-21 Thread John Butler
Does anyone know how to open a file like the below? "Filedata"=>#} file_column is used to upload a document and i need to open it just with the information above, Any ideas? JB -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gr

[Rails] Re: what's up with rails

2011-01-21 Thread Hackeron
Maybe this? < http://planetrubyonrails.com On Jan 21, 4:22 am, Mage wrote: >          Hello, > > I subscribed a long time ago but had no time to read the list. I was > just wondering what's up with rails? The website and the blog wasn't > updated since November (except the news aobut a conference

[Rails] Re: Regex, size check inside a Controller's method.

2011-01-21 Thread Marnen Laibow-Koser
CuriousNewbie wrote in post #976445: > Hello, I'm working to create a method in my controller to check an > email to see if the email's domain is acceptable. I want to prevent > gmail and hotmail for certain reasons. Here's what I have so far: > > controller: > if valid_email_domain(email_addre

[Rails] Re: RSpec / Cucumber painfully slow Rails 3 OSX

2011-01-21 Thread Marnen Laibow-Koser
Arailsdemo A. wrote in post #976437: > 1) If your running 'rake spec', then don't, unless you need to do 'rake > db:test:prepare' also. But don't you always need to do that? Isn't that the task that clears out the test DB? Or is that not an issue since you're (hopefully) running your specs tra

[Rails] Webrick not giving me any output

2011-01-21 Thread Jim Burgess
Hi, Webrick has stopped giving me any output as to what it is doing. In the past it would show me what was going on internally as I navigated around my rails app (e.g it would show me any MySQL queries performed or if a template was missing). Now when I start Webrick I get: D:\Files\Rails projec