similar to: 1 layous for application with modules

Displaying 20 results from an estimated 6000 matches similar to: "1 layous for application with modules"

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
2005 Nov 13
2
Link_to :protocol and :host?
Hello, I am trying to set the protocol and host in link_to based on the documentation. I have the following: <%= link_to "View Cart", {:controller => ''store'', :action => ''view_cart'', :protocol => ''https://'', :host => ''secure.host.com''} %> I would expect this to generate a https link to another
2008 Mar 06
5
Setting :canvas => false for URL generation doesn''t always work?
I generate a lot of URL''s in my Facebook related code that point to our main site, not our FB app. My understanding was that the way to do this was to use ":canvas => false" as a parameter to url_for and link_to and so on. However, that doesn''t seem to generate the proper URL''s. The URL''s still point to apps.facebook.com (because they
2006 Jan 18
2
How do you get link_to to work correctly when using subdomains as account keys?
When using subdomains as account keys (as per this HowTo: http://wiki.rubyonrails.org/rails/pages/HowToUseSubdomainsAsAccountKeys), how can you get link_to to spit out the correct URL (i.e. account123.domain.com)? <%= link_to "My Account", { :action => "show", :id => "account123" } %> would generate "http://www.domain.com/show/account123" I
2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
I am just diving into Rails and I am a bit puzzled by the link_to function. am writing an app to display my photographs in categories. My application layout has a sidebar to show a menu with categories from the categories table in the database (like in taken from the tutorials), to be shown on every page. I managed to get a global @menu_categories object that keeps track of all the categories
2008 Jan 25
8
simple routing & linking question
So I have an existing app & facebook app in same rails application, for now I have decided to go the route of creating a controller for facebook stuff (called FaceController). (setup is canvas, fbml) So I have: facebook config http://myurl:myport/face/ My controllers name is face, so I dont even need a manual route, for the landing page it works like a charm. but, when I try to make
2006 Apr 24
2
link_to external link
I have searched through the api several times through and can''t seem to find this. <%= link_to ''Help'', {:url => ''https://www.example.com/page?AppServeHelp''}, {:target => "_new"} %> but this doesn''t work as it still prepends the current server/controller space on the url itself. How do I accomplish this? Thanks Craig
2006 Jan 18
5
redirect_to with an anchor, how ?
Hello, I try this : redirect_to :action => ''infos'' , :id => params[:id] , :show => "comments#a" i want this : .../infos/15?show=comments#a but I have this : .../infos/15?show=comments%23a Someone could tell me how generate an anchor link ? Thanks
2006 Mar 18
16
fixrbconfig - does it work on intel macs?
I''m trying now to do "sudo fixrbconfig" in the terminal, and I get this: /usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h does not exist. This probably means you haven''t yet installed Xcode from the Tiger DVD. You won''t be able to compile Ruby extensions without it. Please install it then rerun this program. I''m on an intel mac. Am I unable to use
2007 Aug 30
1
alias_method_chain stack level too deep in Rake test only
I have an odd error. I have the following module: module ActionController module SslSupport def self.included(base) raise "#{base} does not define url_for" unless base.method_defined?(:url_for) unless base.respond_to?(:url_for_without_ssl_supprt) base.send :include, InstanceMethods base.send :alias_method_chain, :url_for, :ssl_support end
2006 Jun 14
1
Absolute URL from link_to?
What options do I need to provide to link_to so that it generates truly absolute URLs (i.e. including protocol://host:port/path)? It seems that even when I provide :host and :protocol arguments to url_for that it suppresses these when they match the current request.
2008 Mar 31
10
Problems with *_path() and *_url() helpers when using Publisher
Hello, I am running into issues using *_path() and *_url() helpers the Facebooker Publisher framework. I encounter the following error when using these helpers while *inside of a partial*: undefined method `default_url_options'' for ActionView::Base:Class I''ve seen a few other people speak about this issue, yet I haven''t seen any resolution on the mailing list yet.
2007 Sep 18
0
[PATCH] Automatically set :only_path option to false when :host option is specified in url helpers
Hello, I''ve just posted a patch to the Trac. It intends to simplify the use of url helpers such as link_to when you use the :host option. When you''re using a helper such as link_to and that you provide a :host option to it, it''s not use by default, you have to set :only_path to false too to enable it (to have the full URL, not the relative one). This tiny patch
2006 Jun 04
3
Absolutize URLs in a string
I wonder - do we have some helper/processor/gem to automatically convert all URLs in a passed string to their canonical equivalent - i.e. with the protocol, host and such prepended based on the Rails environment. Super-duper infty for RSS feeds (I hate their requirement for canonical URLs everywhere). -- Julian ''Julik'' Tarkhanov please send all personal mail to me at
2009 Jan 18
3
ActionMailer and url_for in helper methods
Hi, I was wondering how to get url_for to work inside ActionMailer. I did research on the web but I can''t seem to find something that fits what I need. In my application, each user can specify their custom domain to access their. I have an ActionMailer that sends them notifications of changes that occur. In there, I have a breadcrumbs helper method, which generages something like:
2007 Feb 15
17
Odd parameter munging with with()
Hi, I have this setup block: setup do session[:login] = ''jhughes'' @user = mock("user") User.stub!(:find).and_return(@user) @params = {:cn => "Bilbo Baggins", :telephoneNumber => "416-277-4418", :mail => "bilbo at baggins.com"} end And then this spec: specify "should update and save the
2007 Apr 22
7
Getting a complete URL from Rails
Hello, I''m sending out an e-mail message to new users of my service. I want to send a particular link in this e-mail but I can''t figure out how to get a complete URL from the url_for method. Is there a way to do this without manually setting the host name? Thank you, -- Miles --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Jul 27
4
problem with elsif
hi! i have a little problem, im working with permissions, so if u are a normal user, u can only view something and admins can view,edit, delete i pick up the level, and then i check up, if the level is right, and then i put the options. but i dont know why, the admin can only view and delete, i mean my code only take the last link_to here is the code: <%= link_to "read",
2006 Aug 18
3
equivalent of "puts" in rhtml
Hi everyone, This seems so basic, and yet I can''t quite figure it out. Say I have some code in an .rhtml document: <%= if @session[:user_id] link_to somethingA else link_to somethingB link_to somethingC end -%> Only the link to somethingC will show in the second case. I understand that the last thing returned from that else block is that last line. In php i could just add
2006 Jun 07
2
Hash flattening on paginator link_to
Hey I need some help with pagination and the link_to in the view. I''m trying to include a hash in the pagination link_to params and it keeps flattening out my hash. Example: Here''s my hash called @answer: "answer"=>{"6"=>"9bf31c7ff062936a96d3c8bd1f8f2ff3", "7"=>"6f4922f45568161a8cdf4ad2299f6d23"}