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
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
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
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
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
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
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
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
>
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
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
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
--~--~---
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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:
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.
--~--~-
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
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
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
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"
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
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
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
--~--~-~--~~~---~--~-
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
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
> 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)
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
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/.
--~--~-~--~~~---~--~~
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.
--~-
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
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
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
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.
--~--~
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:
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
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
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
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
> 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
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
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
--~--~
> 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
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
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
> 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:
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
/|
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
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
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
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
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
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
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
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
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
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=>
86 matches
Mail list logo