hi, guys I tried using Thoughtbot''s High-Voltage to generate static pages in my app. For some reason, I can''t seem to make it work cause it keeps redirecting to one of my search pages. Anyway, I can''t seem to find more info in the documentation of high-voltage. There was some mention of "danger" in the docs but that''s about it. I have googled on how to generate static pages using rails but can''t find anything useful. I guess for the moment, i will have to create a controller (named after the static resource, "about_us") followed by a corresponding file in the view. Anyway, can anyone share a good way of generating static pages? Thanks! -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ct9a wrote:> hi, guys > I tried using Thoughtbot''s High-Voltage to generate static pages in > my app. For some reason, I can''t seem to make it work cause it keeps > redirecting to one of my search pages. Anyway, I can''t seem to find > more info in the documentation of high-voltage. There was some mention > of "danger" in the docs but that''s about it. > > I have googled on how to generate static pages using rails but can''t > find anything useful. >If they''re static, don''t generate them with Rails. Rails is only for generating dynamic pages.> I guess for the moment, i will have to create a controller (named > after the static resource, "about_us") followed by a corresponding > file in the view. >No controller needed. Just put the static stuff in the public directory.> Anyway, can anyone share a good way of generating static pages?If you really want to *generate* static pages, try StaticMatic. But I don''t think that''s what you actually meant.> > Thanks!Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What kind of problems are you seeing? Maybe you set it up wrong, have you seen http://robots.thoughtbot.com/post/160768450/high-voltage ? Perhaps paste your routes.rb or `rake routes` and that could help too. -Nick On Feb 3, 2:57 am, ct9a <anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, guys > I tried using Thoughtbot''s High-Voltage to generate static pages in > my app. For some reason, I can''t seem to make it work cause it keeps > redirecting to one of my search pages. Anyway, I can''t seem to find > more info in the documentation of high-voltage. There was some mention > of "danger" in the docs but that''s about it. > > I have googled on how to generate static pages using rails but can''t > find anything useful. > > I guess for the moment, i will have to create a controller (named > after the static resource, "about_us") followed by a corresponding > file in the view. > > Anyway, can anyone share a good way of generating static pages? > > Thanks!-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ryan Bates (railscasts) also has an episode on the subject: http://railscasts.com/episodes/117-semi-static-pages -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 3, 2:57 am, ct9a <anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I tried using Thoughtbot''s High-Voltage to generate static pages in > my app. For some reason, I can''t seem to make it work cause it keeps > redirecting to one of my search pages. Anyway, I can''t seem to find > more info in the documentation of high-voltage. There was some mention > of "danger" in the docs but that''s about it.The "Danger" reference in the docs is a joke, referring to the name of the engine, which is named after the song "High Voltage" by the Electric Six: http://www.youtube.com/watch?v=HD5tnb2RBYg You do not create a controller (part of the reason for using it). You should be able to: link_to "About Us", page_path("about_us") What is your search page''s route? What is your output when running "rake routes"? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi, Marnen :) StaticMatic - sounds interesting. Will google and read. Cheers :)> > If you really want to *generate* static pages, try StaticMatic. But I > don''t think that''s what you actually meant. > > > > > Thanks!-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi Dan, thanks for the explaination. Finally clicked LOL Alas, i have remove the code that used it but i will go back to git and see what i can do. Cheers, Dan! -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hey, Dan, Any intention to offer high voltage as a gem? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
1)routes.rb
==========
ActionController::Routing::Routes.draw do |map|
  map.resources :parts, :has_many => :images
  map.resources :parts, :has_many => :fits
  map.set_primary_image ''parts/:part_id/images/:id/
primary'', :controller => ''images'', :action =>
''set_as_primary''
  map.resources :brands
  map.resources :makes,      :has_many => :vehicles
  map.resources :categories, :has_many => :sub_categories
  map.resource  :account, :controller => "users", :has_one =>
''address''
  map.resource  :user_session
  map.search_form ''/search_form'', :controller =>
''search'', :action =>
''form''
  map.search ''/search'', :controller =>
''search'', :action =>
''perform_search''
  map.root :controller => "home"
end
2)Extract of "rakes"
===================
<---------- Extract start -------------------->
(in /home/ct9a/projects/myApp)
               search_form        /
search_form
{:controller=>"search", :action=>"form"}
                    search        /
search
{:controller=>"search", :action=>"perform_search"}
 
root        /
{:controller=>"home", :action=>"index"}
           ...
                      page GET    /
pages/:id(.:format)
{:controller=>"high_voltage/pages", :action=>"show"}
Showing all Routes
- /pages/:id(.:format)?
<---------- Extract end   -------------------->
3) Error message
===============
Error message on webbrowser as soon as I open up: "http://sample.com/
pages/tester"
<---------- Extract start -------------------->
 ActionController::RoutingError in High_voltage/pages#show
Showing app/views/search/_keyword_form.erb where line #1 raised:
No route matches
{:action=>"perform_search",
:controller=>"high_voltage/search"}
Extracted source (around line #1):
1: <% form_for :search, :url => { :action =>
"perform_search", :controller => "search" }, :html =>
{:method =>
"get"}  do |f| %>
2:   <p>
3:      <input id="search_by_keyword"
name="search[by_keyword]"
size="30" type="text" />
4:     <%= f.submit ''Search'' %>
<---------- Extract end -------------------->
For some weird reason, I do not know why the search controller is
being invoked...
On Feb 4, 2:37 am, Dan Croak
<dcr...-8pFq7iY+Mm7NL9alfNIhog@public.gmane.org>
wrote:> On Feb 3, 2:57 am, ct9a
<anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> >  I tried using Thoughtbot''s High-Voltage to generate static
pages in
> > my app. For some reason, I can''t seem to make it work cause
it keeps
> > redirecting to one of my search pages. Anyway, I can''t seem
to find
> > more info in the documentation of high-voltage. There was some mention
> > of "danger" in the docs but that''s about it.
>
> The "Danger" reference in the docs is a joke, referring to the
name of
> the engine, which is named after the song "High Voltage" by the
> Electric Six:
>
> http://www.youtube.com/watch?v=HD5tnb2RBYg
>
> You do not create a controller (part of the reason for using it).
>
> You should be able to:
>
> link_to "About Us", page_path("about_us")
>
> What is your search page''s route? What is your output when running
> "rake routes"?
-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.