similar to: Forum

Displaying 20 results from an estimated 100 matches similar to: "Forum"

2007 Jul 19
7
NoMethodError in partial driving me mad
Hello, i simplified have a news model, a news category model and a news controller. my _news.rhtml partial renders a single news entry. in my controller there are the actions show and show_category. if the "show" action is called, a single news item is rendered through my partial with no errors. if the "show_category" action is called, i get a NoMethodError while displaying
2006 Jan 08
2
sorting issue
I''ve got the following setup: category (hm) <-> (bt) activity An activity has an amount, date, location, note, and category. I''m sorting my activities table by category_id (foreign key in activity), but how do I sort it by category_name instead? Basically I just need category_name in the result set. Here''s what I have now: @all = Activity.find(:all, :order
2006 Apr 21
6
How access to the tables whitout a model
i have a table called Products whit a model product, but in the view i need show the category od the product, but whitout a model of categories... -- Posted via http://www.ruby-forum.com/.
2006 Jul 07
9
Search on data accross many tables, linked by belongs_to
I am using Ferret and acts_as_ferret, as my search back-end for my Rails project. I have a question about using acts_as_ferret on a main table that is linked to other tables by foreign keys. Is there a way to include the information linked by the belongs_to keyword in the search results ? As an example, let''s say I have a main table ''posts'':
2004 Aug 06
2
XML statistics on remote server
what i did in this situation was dump the stats/status file to the local server through a lynx --dump call from php .. and then i also update a sql table to reflect the changes so i can poll that instead .. a. <p>On Thu, 26 Feb 2004, MacSym wrote: > > Hi everybody, > > I am wondering if it is possible to generate the XML/XSL files on a remote > server (status.xsl,
2007 Oct 08
1
An Extra for Python (was: Re: seemingly no good way to end bulleted list and start code block)
On 10/6/07, Lou Quillio <public at quillio.com> wrote: [snip] > Wish there were an 'Extra' for Python. > There is. Sort of. Python-Markdown has an extension interface [1]. There's a number already available and its fairly easy to write your own. I've slowly been adding many of php extra's features [2]. Unfortunately, some things are still hard, but were working to
2010 May 13
1
Routing - newbie question about shorting the url
Hi Right now I have my url showing as the following: http://localhost/categories/italian/recipes/special-pasta-sauce I would like it to be: http://localhost/categories/italian/special-pasta-sauce (or even http://localhost/italian/special-pasta-sauce) my category model has_many :recipes and my recipes model belongs_to :category (for the purposes of my test project a recipe can only belong to one
2006 May 11
3
Find By ID
Hi folks, Newbie with ruby on rails but very excited by the features provided by the framework ;) Suppose I''ve got a table ''Company'' and a table ''Category'' Company belongs to a category but I will retrieve the Catagory in the Company list? It seems that I don''t have the basic ruby wau of thinking to get this easily. Can someone help?
2007 Aug 06
4
acts_as_ferret cross model index not updating
Does anyone know how do you get acts_as_ferret to automagically update non-standard fields? I''ve followed Rails Envy''s tutorial (http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial#nonmodel) to get aaf working across different models. And once the index is built it searches fine. In my (main) model, I''ve put: acts_as_ferret :fields => [ :name,
2006 Mar 12
11
HABTM selection conditions
Hi, I am currently trying to learn RoR and there is something I cannot figure out. I have two models: Article and Category, that are HABTM-linked. Everything works fine if I want to select all articles corresponding to a category, with something like @articles = @category.find(@params[:id]).articles However, I have a ''published'' field in my ''articles''
2008 Oct 09
1
Cisco 7960 sccp, Skinny and 1.4
Hi All, I'm thinking of creating a new asterisk server using the latest 1.4 stable release to replace my ageing Asterisk SVN-branch-1.2-r7231 (its been a while!). My only concern - my phones are Cisco 7960's (with sccp firmware 7.2 loaded) and to support them better, I remember compiling in a skinny(?) driver to replace the (from what I could tell) basic in built sccp support. After
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end (For the purpose of this exercise, category names are unique) I have the corresponding delete.rjs file: if @element_id page.remove :id => @element_id page.visual_effect :highlight,
2007 Sep 23
4
Story Runner, autoincrementing
I''ve written a story and I run into a snag. I''ve written the create_forum method and told it to set the id to 1 but when it creates the forum the id is autoincremented. My forums table is empty but the id keeps incrementing the newest record on creation. When I run the story it comes out as something like 59 which fails my story because I''m asking it to look at /forums/1
2007 Nov 09
2
Problem with stemming and AAF
I''m sure I''m missing something completely obvious here, so I hope someone can point me in the right direction! I''ve implemented a basic search with AAF, which works as expected; I''m running a ferret drb server, and using will_paginate to page results. The code in my search_controller.rb: search_text = params[:query] || " " @products =
2008 Jul 05
3
edit uploaded file
how to edit uploaded file ???pls help.. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2006 Jan 02
6
Paginate with joins messing with id
Hi all, Best wishes for the new year! :'') I''m very new to Ruby and Rails, and I ran into a problem with the "paginate" function. When I use the following method to get a number of forum topics based on a category name passed via the URI: @topic_pages, @topics = paginate :topics, :joins => "INNER JOIN categories ON
2013 Nov 10
3
accepts_nested_attributes_for how, example
I have following tables with following models: users(id, role_id) *has_many :entries* categories(id, category_name) *has_many :entries* entries(id, category_id, user_id) *belongs_to :user, belongs_to :category, has_one :storage* storages(id, title, content, entry_id)* belongs_to :entry*, *has_one :vote* votes(id, count, storage_id) *belongs_to :storage* Now,
2006 Jan 02
3
Selecting conditionally from HABTM
Hello, I was wondering whether there is a nice Rubyesque way of selecting from a pair of HABTM models where one of them is inherited from another object. Here is the situation: I have a ''posts'' table from which ''replies'' and ''articles'' are inherited. Articles have_and_belong_to_many categories, but neither posts nor replies do (it just does
2009 Jun 21
5
Query about emphasis
Hello List, Firstly, I was very impressed when I tried markdown 2.0 recently. Fantastic work all! I have a query about the treatment of emphasis. I realise that the horse has bolted, and changes to currently supported functionality are unlikely to attract support. However, there does seem (at least in my tiny mind) to be a mis-match between the following stated goal and the present
2009 Dec 06
9
Route error to Admin namespace
Hi. I have some apps that i have "admin" areas to the clients manager the app. This "admin" is a directory on my controllers path, like this: my_site --> app -->-->controllers -->-->-->admin And my controllers in "admin", i use the correct namespace(example for clients_controller): class Admin::ClientsController < AdminController Only doing