search for: admanb

Displaying 19 results from an estimated 19 matches for "admanb".

Did you mean: adman
2006 Apr 07
13
Pop up menus - any ideas?
I''ve got a menu in which I have all of my categories as links. Each category also has subcategories. I want to set it up so when you mouse over the category the subcategories will pop up (to the right of the main list, but that''s just CSS). This is what I have so far: <% for category in @categories %> <a href="#"
2009 Jan 20
4
Shared templates across controllers
Hey all, Here''s my situation: I have a pair of controllers with associated models (called Services and Testimonials) that are quite similar. Because their CRUD behavior is executed via AJAX, the "templates" for the actions are all short .rjs files. Now, because of the similarity of the models, most of the templates are exactly the same, with only the object names changed. That
2006 Mar 31
7
Checkboxes expand to show new options when checked?
I''m writing a simple CMS where every item ("listing") HABTM categories and subcategories (which themselves belong_to a category). What I''m trying to do now is create a UI effect for listing creation: when you go to create a listing, only the possible categories will be shown, but when you select a category a set of new categories will be displayed like so: Lions
2006 Apr 15
3
login_engine database migration broken?
...login_engine/. The commands I''ve tried are: rake engine_migrate ENGINE=login which fails with "Don''t know how to build task ''engine_migrate''." and: rake import_login_engine_schema ENGINE=login which fails with "no such file to load -- /Users/admanb/Documents/h4x/Ruby/anime/config/../vendor/plugins/login_engine/db/schema.rb" and there is, infact, no such file. There''s only one named "001_initial_schema.rb" in login_engine/db/migrate. Will it work find if I just add the table to my sql database? Thanks, Adam -- Pos...
2006 Apr 21
11
Phone Numbers in Rails/MySQL
Is there any easy way to make a fancy looking form to take phone numbers. Something that looks like this: [ ] - [ ] - [ ] ext: [ ] Then when you submit it it''s combined into one string in the database. Optimally it would auto-switch from field-to-field after you fill each field. Has anyone seen anything like this in Rails? Thanks, Adam -- Posted via
2006 Apr 23
2
blog model?
I just finished my auth zone and have some controllers to add content in the admin zone, now i want to build a blog, i have the 2 tables, posts and comments but i still dont get how to relate them, someone knows how to make a blog structure/model in rails? Any help will be very apreciated :) -- Posted via http://www.ruby-forum.com/.
2006 Mar 26
3
Making a custom selection form - newbie
Hello all, I''ve been working with Ruby on Rails for a few weeks now. It''s difficult for me because I don''t have much experience with Ruby, Rails, MySQL, or any other web-languages. But I''m trudging on and learning a lot. I''ve been working on a web application for my dad''s website; it''s a simple content manager for
2006 Apr 11
2
Finding items from two models - then merging them
I have a model, listings. Listings habtm categories and subcategories, which are seperate models. What I want to do is search categories for certain items, like so: @categories = Category.find(:all, :conditions => ["name LIKE ?", "#%{:search_string}%" and subcategories for the same: @subcategories = Subcategory.find(:all, :conditions => ["name LIKE ?",
2006 May 05
1
Keeping an array through action calls
I have a model, "note", which has any number of tags. I want users to be able to create tags within the same form as creating a note. I have that part. :) Where I''m lost is that I want to be able to type in a tag name, hit enter, and have it added to a temporary list of tags which tracks the tags that have been added to this note. So you go to write a note, fill everything
2006 Apr 15
8
Inheritance in Rails - I need some help
I''ve got a model, "category" and another model "subcategory." Each subcategory belongs_to a category, and a category has_many subcategories. What I need to do is set it up so that I can search Category and Subcategory with one .find call. So: Category.find(:all, <etc) will find categories and subcategories. Now, I believe this can be done by making
2006 Apr 05
13
scaffold misuse?
Running ruby script/generate scaffold Product Admin is a wonderful way to set up well, exactly what it says, a scaffold. My problem is that I have several other tables that are linked, through foreign keys, to the Product table. Say an "authors" table. Now when I go enter a new product, a book, I want the application to provide a drop down list of authors generated from the records in
2006 Apr 05
1
Installing Rails for emacs on OSX - emacs newbie
I''m a newbie to emacs trying to set up emacs Rails on a clean emacs installation. I''m using Aquamacs: http://aquamacs.org/. Basically, I''ve gotten to the part where I have to install the cedet package to install ECB to install Rails to ? you get the idea. I''ve forgotten all of my feeble Linux commands and have no idea what I need to do to install the packages,
2006 Apr 14
1
Model extends and belongs_to another model - problem
I have a model, categories, and another model, subcategories. In my current code these have no connection except for the fact that categories has_many subcategories and a subcategory belongs_to a category. But by necessity, I need to change it so Subcategory extends Category; so that I can search both models with one command. I was hoping it would be as simple as changing Subcategory <
2006 Mar 29
0
Many-to-many relationship with multiple models?
I have a simple CMS I''m creating, and the primary model is the "listing". A listing habtm (has_and_belongs_to_many) categories (up to two) - allowing the listing to print its categories and a category to print its listings. I also need subcategories, which are different from categories in two ways: a listing can have as many subcategories (from it''s two categories)
2006 Apr 15
3
Dumb newbie question - text formatting?
I have a MySQL "text" element that I''m trying to display, but it''s not formatting (i.e. it''s all one big paragraph). In the AWD depot example it doesn''t look like they do anything special, but they get formatted text. I''ve tried it with both: <%= show.description %> - puts text, and formats according to any HTML tags I typed in.
2006 Apr 15
6
Two forms for two models - one page
I''ve got two forms for two different models on the same page. What I want is for one of the forms to return you to the same "new" page and not clear the data in the other form. I was hoping it would be as simple as render :action => ''new'' but no such luck. Any thoughts? Thanks, Adam -- Posted via http://www.ruby-forum.com/.
2006 Apr 13
3
Sorting an array of models
I have a model, listing, which belongs_to one or more categories. I need the user to be able to search for categories by name (which I can do) and have it return all the listings that belong to those categories. This I can do. However, what I need to do is take that list of listings and sort them by one of their fields. This is a bit more complicated, without needing to sort I could just do:
2006 Apr 09
7
Simple Search
I''m trying to implement a search system and I''m lost as to how to go about it. I''m searching the model "category", and I''m searching the "name" field. >From there I''ll use @categories.listings to display. But that''s the easy part. I assume I need to use a LIKE command in MySQL, but I don''t know how to do
2006 Mar 30
5
Heeelp - no idea what''s going wrong.
I''m working on a simple CMS. The main data type are "listings" a listing habtm (has_and_belongs_to_many) categories and subcategories. Subcategories belong_to categories. Subcategories are basically the same as categories, but they are treated differently in a few situations. The problem is, I can''t seem to write the view/controller/model code that allows me to