Displaying 9 results from an estimated 9 matches for "bljohnson".
Did you mean:
bjohnson
2006 Mar 21
4
Determining Browser?
Is there a way I can read the user agent or something similar to
determine whether the person is using IE, Mozilla/Netscape, Opera,
Safari, etc? I want to dynamically output the CSS to the browser, but
I''d like to change certain things (in this case the widths of some
divs since IE adds borders and padding size to the total size of a div
unlike firefox).
Thanks,
- Brent
2006 Mar 22
5
Class Caching Problem [was Newbie Question about Custom Classes]
...er EVERY change to the file. The controllers and views are
reloading just fine and not being cached. It''s just the custom class
I created that''s being cached.
Any ideas as to what I should try to get it to stop caching the class?
Thanks,
- Brent
On 3/21/06, Brent Johnson <bljohnson@gmail.com> wrote:
> Yep, the filename of the Article model is app/models/article.rb. I''m
> still trying to figure out why it''s being cached under WEBrick and
> Apache both.
>
> Thanks,
>
> - Brent
2006 Mar 30
6
Global Method Declaration?
Is there a place where I can put a method that can be accessed in both
views and controllers?
Here''s the situation, maybe someone can suggest a better way to go about this:
I created my own custom login system with email verification and user
roles (basically, I tinkered around with SaltedHashLoginGenerator
until I finally gave up and wrote my own). One role, of course, is an
admin
2006 Apr 04
2
Pagination and Parent Conditions
Can I do any "fancy" conditionals when using the Pagination helper?
The problem is that I want to be able to specify a conditional based
on the criteria of a parent object. Here''s an example:
Object A has_many Object B''s
I want to paginate through 100 B''s but I *only* want it to return the
ones who''s A.flag = true
I poked around through the Wiki
2006 Mar 20
0
Re: Rails Digest, Vol 18, Issue 502
...eeded to translate a zillion articles to some new future standard, he would
be able to; I still don''t know if I wasn''t knocking my head against the
wall. YAML???
Victor Kane
http://awebfactory.com.ar
Date: Mon, 20 Mar 2006 10:57:52 -0500
> From: "Brent Johnson" <bljohnson@gmail.com>
> Subject: Re: [Rails] Newbie Question about Custom Classes
> To: rails@lists.rubyonrails.org
> Message-ID:
> <9a27dace0603200757r51a8d5d3o892f601ee43ed934@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks for the response. I...
2006 Mar 20
24
Newbie Question about Custom Classes
Sorry if this is a complete newbish question, but I''m trying to wrap
my head around creating custom classes in my rails webapp. I''m
normally a Java developer, but I figured I''d give RoR a try and see
how I like it, and whether it would be useful for production use with
a new client.
Anyways, what are the best practices for custom classes? Where and/or
how do I create
2006 Mar 28
0
Question about Mapping from Forms
During a load or save in my controller I''ve manually been doing:
@myobject = MyObject.find(:first, :conditions => "id = #{@params[''id'']}")
If I''m updating an existing object I load it, change stuff using
something like myobject.name = "@params[''name'']", etc etc, then call
save. That''s what I''ve done in
2006 Mar 31
2
Backslash Escaping in View
Ok, I''m hoping this won''t be a forehead slapper, but take a look at this code:
physician.name.sub(/''/, "\\''")
I''m trying to substitute a single quote with a backslash and a single
quote. This seems pretty simple right? Well, someone kick me and
tell me why it''s not :)
Here''s what I''m getting if the
2006 Mar 29
3
Redirect Post for Hiding ID?
I have a situation where I want to show the user details about an
appointment they entered. They enter their name, phone number(s) and
other private data in a form. I save that data in the controller with
a POST from a "confirmation" page.
I could simply show the params when that page is rendered (the save
one), but if they use the browser refresh it''ll save the data again.