Displaying 7 results from an estimated 7 matches for "static_pages".
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string
2012 Sep 16
0
tutorail test writing problem
...st is still failing even if I do everything according to the
chapter.
My code can be found here : https://github.com/roelof1967/demo_app
And the faiing message is :
Failures:
1) Static pages Home page should have the content ''Sample App''
Failure/Error: visit ''/static_pages/home''
NoMethodError:
undefined method `visit'' for
#<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x0000080572bf98>
# ./spec/requests/static_pages_spec.rb:8:in `block (3 levels) in <top
(required)>''
Finished in 0.0099 seconds
1 example, 1 f...
2012 Aug 16
1
How to create subpages.
...Would I need to create a new controller for each page category? (i.e. home,
about, contact, support). And then add the pages within each respective
category.
The big problem I am having currently is routing the pages.
So I currently have the top level navigation all done under 1 controller
(static_pages_controller.rb) & the routes.rb (match ''/about'', to:
''static_pages#about'').
So I am trying to figure out how I would add the subpages for about
(history, location, careers) so they the url www.example.com/about/history
etc.
I''m sure there is an...
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
...response.body.should have_content(''flash boo'')
end
end
class StaticPagesController < ApplicationController
layout ''master''
def show
response.headers[''Cache-Control''] = "public, max-age=#{6.hours}"
render "static_pages/#{params[:page]}"
end
end
I''ve tried changing to a layout which does render flash notices, and even
inserting the text into the layout template, but can''t make the spec fail.
Is there a way to ask rspec to render the template with the appropriate
layouts as well?
Is a...
2005 Dec 15
4
Database best practices?
I started with rails a few weeks ago and I''ve been very impressed with
the whole framework. My first project after the cookbook was a small
application connecting to Postgres. This was originally a port of an
Access application so I was delighted with the new facilities for
constraint checks, triggers, etc.
As I started to write the front-end though I noticed myself rewriting
the
2012 Dec 16
2
css background image not working
...r the life of me I cannot get it to work. When I open up and
inspect the element I keep seeing in the resources that the file cannot be
found with a red "!" next to the image.
I have tried different paths still no avail...
../images.bg.png
./images.bg.png
assets/images.bg.png
In my static_pages.css.scss I have
body {
background: url(/images/bg.png);
}
--
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 fr...
2012 Aug 29
7
custom js in rails project
Hello, I have a rails project with one controller and one action, as
simple as posible. And I''m trying to put some custom css and js to my
own index.html.erb (not public/index.html.erb), I inluded this on the
layout file:
layout file:
<!DOCTYPE html>
<html>
<head>
<title>Volei</title>
<%= stylesheet_link_tag "application", :media =>