similar to: params for link_to_remote

Displaying 20 results from an estimated 2000 matches similar to: "params for link_to_remote"

2007 Jul 19
3
Merb::Controller#url Usage
I have a question about the usage of Merb::Controller#url. When I have nested resources, requesting the new action works differently than I expected. I was wondering what the intended usage is. For example: Say I have r.resources :articles do |article| article.resources :article_attachments end irb(main):002:0> show_routes [:articles, "/articles"] [:article_attachments,
2010 Mar 27
2
Shorter Rails 3 routes
Hi, I have a small blog application, and I would like to shorten its routes. Here they are: Blog::Application.routes.draw do resources :categories do resources :articles do resources :comments end end A rake routes command produce the following lines: GET /categories/:category_id/articles/:article_id/comments(.:format)
2011 Dec 16
3
PROBLEN IN AJAX USING RJS
I am using rails 3. I have problem in out put so please tell me my mistake routes ------- entermatch ''/view_article/:user_id/:article_id'' => ''articles#view_article'', :as => :view_article resources :users do resources :articles do resources :comments end end article controller ------------------ def view_article @user =
2006 Mar 01
4
link_to_remote, doesn''t receives params?????
Hi, I''m using link_to_remote to trigger an ajax zone, but depends on a varaible, the new zone has different features. before I has a button inside a form. so when I click on the button, I get the value of the variable inside "params". but since I use link_to_remote now, I don''t get any value from params anymore.... Is there some way I can get the data inside a form
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users
2009 Nov 12
1
Please help me ------ Mapping an item to article
Hi everybody, I have a form like this <h1>New menuitem</h1> <% form_for(@menuitem) do |f| %> <%= f.error_messages %> <p> <%= f.label :title %><br /> <%= f.text_field :title %> </p> <p> <%= f.label :alias %><br /> <%= f.text_field :alias %> </p> <p> <%= f.label
2008 Jan 11
3
Date range queries return zero results
Hello, I am having trouble getting data ranges to work correctly. I am using the following command to load the db: index << {:title => row[7].to_i, :date => Date.strptime(row[3], ''%Y-%m-%d''), :page_id => row[5].to_i, :page => row[6].to_i, :content_type => row[1].to_i,
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb 1 - map.connect "events/:action", :controller => ''events'', :action => / [a-z_]+/i 2 - map.resources :events, :has_many => :comments, :has_one => :address #, :collection => {:mapit => :get} I have #1 so that I can call custom actions from a link_to_remote link from my index page t0 update a
2006 Jan 09
4
Problem with habtm and resulting SQL insert
Cheers, I have a problem with 1.0 and a habtm relationship between User and Article. I want to save all articles that users read. I have these models: class User < ActiveRecord::Base has_and_belongs_to_many :read_articles, :class_name => "Article", :join_table => "read_articles" ... end class Article < ActiveRecord::Base has_and_belongs_to_many :readers,
2009 Jul 17
1
attachment_fu :partition => lamda {}
Hi - I am trying to dynamically create my partition folders via attachment_fu. I have read about a hack that allows you to do this on the attachment model: :partition => lambda {|a| a.article_id} Which passes the model''s object into the lambda and uses the ''article_id'' attribute as its directory name. However, this isn''t work for me. I think the lambda
2008 Dec 31
1
resource api docs not working for me
Hi, ruby 1.8.4, rails 2.2.2, mongrel 1.5.1, win xp I read in the docs that this : map.resources :articles do |article| article.resources :comments end should result in this lot: article_comments_url(@article) article_comment_url(@article, @comment) article_comments_url(:article_id => @article) article_comment_url(:article_id => @article, :id => @comment) So when I did
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1. Having this page: <h4>Editing project</h4> <% form_for(:project, :url => project_path(@project), :html => { :method => :put }) do |f| %> <p> Name <%= f.text_field :name %> Date <%= calendar_date_select :project, :target_date, :time =>
2006 Jun 07
2
How to send post data with link_to_remote?
Hi, I''m trying to send a post body with my link_to_remote call. Prototype supports the ''postBody'' option, but I can''t seem to get link_to_remote to set that. Here''s what I''m trying: link_to_remote ''move up'', :url => { :controller => ''upload'', :action => ''position_ajax'', :id
2006 Feb 17
4
link_to_remote doubles border size
I have a div with a border around it. I use link_to_remote to change the content, and the border size doubles. Example: <div id="test" style="border:solid; border-width:5px"> <%= link_to_remote("Test", :update => "test", :url => { :controller => "tester", :action => "test" }) %> </div> Even stranger, if I
2006 Aug 03
0
link_to_remote() question from a newbie.
Hello, I am trying to utilize link_to_remote() in the following manner: <%= link_to_remote(exchange.name, :update => ''mydiv'', :url => { :controller => ''attributes'', :action => :list_user_attributes, :class_id => class.id, :user_id => user.id } ) %> And
2006 Aug 17
2
link_to_remote question
I''m using link_to_remote to call a method that deletes an item <%= link_to_remote " [delete]", :url => { :controller => ''user_admin'', :action => ''employee_type_delete'', :id => employee_type.id }
2009 Sep 19
2
MethodNotAllowed
I am trying to develop an application that allows users to submit articles and add information about the references they used when citing facts. I have the sources broken down into types, such as books, periodicals, web-sites, etc as single table inheritance on the sources table. Routes are nested so that :articles, :has_many => :sources When trying to edit a source, through the
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value of a javascript variable as an argument. Something like that: link_to_remote "my_link", :update => ''my_div'', :url => { :action => "my_action", :var => ''my_var'' } Basically,
2010 Jul 13
1
will_paginate destroys link_to_remote?!
Hello, I''ve got a list in a view and each of element of it has a link_to_remote and everything worked like a charm. Now I added AJAX pagination and the link_to_remote doesn''t work anymore. This is the partial of the list: <% for character in characters %> <%= character.name %> <%= link_to_remote t(''.add''), :url =>