similar to: urls within components

Displaying 20 results from an estimated 20000 matches similar to: "urls within components"

2006 Feb 24
0
UrlRewriter problem in components
Hi! It''s not really a big deal, because the workaround is easy, but I don''t really know if it''s a bug or a feature. Maybe someone can have a look on that. I have a problem with creating links within components. The scenario ============ My "index" action renders a "list" component by calling: <div id="list"> <%=
2005 Jun 06
1
Rails spider/site copy with internal web requests
Hi all, On a related topic to Web spidering, I would like to solve a problem of internally spidering and saving a Rails application from within rails. The goal is to spider and save each resource in a site to a filesystem friendly structure /many/things/1?page=3 -> many_things_1_page_3.html or /many/things/1?page=3 -> many/things/1_page_3.html If a redirect is created
2006 Feb 24
4
too many components?
okay. on /posts/show/13 i have show.rhtml, which does render_component(:controller=>''comments'', :action=>''display_comments'', :id=>post.id) on comments/display_comments i iterate through the comments and then, display_comments.rhtml render_component(:controller=>''comments'', :action=>''new'', :id=>@id)
2006 Aug 31
2
Url rewriting for random urls
Hello, I have discovered the good use of stylesheet_link_tag and javascript_include_tag (I''m still learning) and it is very useful because I have to use the relative_url_root way. Now I wonder how I can use that for other URLs. I want a background image for a table cell so I have to write something like: <td align=''right'' valign=''bottom''
2007 Nov 14
3
absolute urls in url_for vs. link_to
In both url_for and link_to, the :only_path param can be used to determine whether the link url used is complete with hostname and path, or just has the path (a kind of relative url). However, in url_for it defaults to false (urls with hostnames), and in link_to it defaults to true ( urls without hostnames, just paths). Is there any reason for this discrepency? To me, it violates the principle
2006 Mar 10
1
Problem rendering components
I have an AccountsController that inherits from ApplicationController. In ApplicationController I define a generic layout. In this layout I render @title that is actually assigned in the AccountsController but has a default value in ApplicationController. In the layout template, I also have the standard contents_for_layout and lastly, I have a render_component. The component called from the
2006 Jun 07
6
Links on the left hand side - are components necessary?
Hello, Maybe this is super-trivial... I need to have a list of links on the left hand side of my application, for *every* single page. So, I''ve created a layout called "main" (main.rhtml) under view/layouts, and included >layout "main"< in pretty all of my controllers. main.rhtml has, amongst all the other HTML stuff: <%= render_component
2006 Mar 08
1
Components calling components...
Hi, I''m relatively new to ruby and rails. I would like to have a sidebar component call one of several other constituent components. I''ve run into some problems, and so I''ve pruned things back to a relatively simple case. I have a sidebar component. Renders great. In it''s layout, I call render_component for another component I would like in the sidebar.
2006 Jun 21
0
url_for generating URLs without relative root
I''ve got an app that has ActionController::AbstractRequest.relative_url_root = "/super" set in environment.rb. I''d like to use url_for to generate URLs without the relative root, or even be able to specify a different relative root. Is that possible somehow? Pat
2006 Jul 17
0
Modifying URLs
I''d like to be able to take a URL and add or modify a param, just like url_for does in ActionController. However, I''d like to be able to do this for a URL taken as a string, without a controller behind it. So I can''t just call url_for. Any ideas? What''s the best way to do this? -- Posted via http://www.ruby-forum.com/.
2006 Feb 19
2
instance variables in components not read by component view?
Hi, I''m trying to write a sidebar menu with dynamic menus, and to do so I would like to define a list of menus to display within my sidebar component controller code and pass that list to the component display view, like so: # menu_controller.rb class Sidebar::MenuController < ActionController::Base uses_component_template_root @menus = %w{admin user help} def display
2006 May 29
0
using components to reuse code
the following is the code of the controller, under the dir components/test/: class Test::GroupsManController < ApplicationController uses_component_template_root def add_to_group @account = Account.find_by_nick(@params[:nick]) # render :text => "#{session[:account_id]} #{Group.find(session[:group_id]).owner_id}" if (session[:account_id] ==
2006 Oct 22
2
url_for In a Component?
When I try to use url_for within a component I get the following: NoMethodError in LinkController#get_links undefined method `url_for'' for Navbar::LinkController:Class The API docs show url_for as a public method of ActionController::Base. Since my component is derived from ActionController::Base shouldn''t url_for be available within the class? Any ideas? Thanks! -
2006 May 21
2
Nooby partials / component problems
I''m stumped on what seems like should be a fairly easy thing, so I hope someone can point out my error. I wanted to show a few things on every page, so I added an application level template in "layouts". I added my styles in there, and put the controller name and action name into the TITLE tag for my own reference. So far so good - works like expected. Then I wanted to
2009 Jan 12
0
url_for, routes, and the current url
I need to generate 2 types of URL and have defined my routes as: map.country_yes "/:country/ yes", :controller=>"posts", :action=>"country", :yes=>true map.country_no "/:country/ no", :controller=>"posts", :action=>"country", :yes=>false map.yes "/yes", :controller=>"posts",
2005 Dec 28
0
urls in ActionMailer
Hello, I know the ticket about enabling url_for in ActionMailer views is closed and that there are some possible workarounds to this problem such as passing the controller instance or links from the controller, but I cannot figure out what to do if my emails are not sent from a controller - like periodic reminders or notifications triggered by a system scheduler, which need to include links.
2006 May 26
1
flash.keep not working with render_component
Using Rails 1.1.2 and ruby 1.8.4 I''m having a weird issue with the flash when using render_component for an action inside different controller than the one from which you render. I''m passing an object via flash across a couple of actions (new and create) behind the scenes using flash.keep(:object). It works fine if the component I''m rendering is in the same
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
Lindsay, Wouldn''t you want to use a component for this? I know components seem to be out of favor, but they seem like a perfect fit for this very thing. You could then go like: <%= render_component :controller => ''sidebar'', :action => ''home_menu'' %> The :action parameter could even be more dynamic based on your own needs. Maybe someone
2005 Dec 17
1
file_column url_for_file_column from within controler
Hello, i hope somebody can help me: How can i get the path/url for a file stored with file_column within any contoller? Is it somehow possible to use the url_for_file_column method from the file_column_helper.rb ? Greetings and thanx for any advise, Marc -- Posted via http://www.ruby-forum.com/.
2006 Mar 15
5
Passing params to a component
I see from http://rubyonrails.org/api/classes/ActionController/Components.html that is possible to pass paramaters to a component. I don''t understand the exact syntax. I''m trying: @master_id = @params[''master_id''] in the components controller but it is not working. ==== Details: In my calling view I have: <%= h(@opportunity.id) %> <div