Twitter Updates
Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts
Friday, 14 May 2010
So long and thanks for all the fish
I have not made many posts for a while on this blog. Out of frustration with posting code samples and interest of writing sinatra web applications I have setup on webfaction please view http://lizard-spock.co.uk from now on my new posts will be here.
Also my sourceforge/opensource projects will be moved here.
Update: software projects no longer available
Wednesday, 17 March 2010
GIT setup on webfaction
git is a popular revision control system which allow users to make local commits to capture their work in progress before it is pushed to the central repository. Most webfaction servers do not currently have git installed so you will have to compile it your self fairly trivial if you follow the instructions.
The intended work-flow is to keep committing local changes while you work on you r website and when you are happy with it you push to a secure git repo. Then make your webapp pull from the central secure repo.
Now local stuff to connect it
You will see this error
This is because of an oddity in the way the .bash_profile and .bashrc are setup.
ssh only loads the .bash_profile.
.bash_profile
.bashrc
NB: The following may be added so you can use the 'git push' shortcut (it actually runs git push origin master).
Based on http://devioustree.co.uk/2009/07/23/setting-up-git-on-webfaction/
and http://docs.webfaction.com/software/git.html
The intended work-flow is to keep committing local changes while you work on you r website and when you are happy with it you push to a secure git repo. Then make your webapp pull from the central secure repo.
$ shh username@username.webfaction.com
$ cd ./bin
#//Check out the latest version, currently it is 1.7.0.2
$ wget http://kernel.org/pub/software/scm/git/git-1.7.0.2.tar.gz
$ tar zxf git-1.7.0.2.tar.gz
$ cd git-1.7.0.2
$ ./configure --prefix=$HOME && make && make install
#//Clean up the original stuff leaving the compiled binaries in ~/bin
$ cd ~/bin
$ rm -rf git-1.7.0.2*
#//This bring the total from 80MBs down to 14MBs
$ mkdir ~/repo/projectname.git
$ cd ~/repo/projectname.git
$ git --bare init
Now local stuff to connect it
$ cd /path/to/your/local/repository/
$ git init #Assumes it is not already a git repo
$ touch README.md
$ git add README.md
$ git commit -a -m '*Added README.md'
#//Now try to connect to server, will request your ssh password or not if you have key based ssh auth setup
$ git push ssh://user@user.webfactional.com/~/repo/projectname.git
You will see this error
$ bash: git-receive-pack: command not found
$ fatal: The remote end hung up unexpectedly
This is because of an oddity in the way the .bash_profile and .bashrc are setup.
ssh only loads the .bash_profile.
.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
## MOVE THIS TO .bashrc THENthey Will both be the same
# User specific environment and startup programs
#PATH=$PATH:$HOME/bin
#export PATH
.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# User specific aliases and functions
NB: The following may be added so you can use the 'git push' shortcut (it actually runs git push origin master).
$ git remote add origin ssh://user@server-ip-or-address/~/repo/projectname.git
$ git push origin master
$ git push
Based on http://devioustree.co.uk/2009/07/23/setting-up-git-on-webfaction/
and http://docs.webfaction.com/software/git.html
Webfaction and google apps
First register (for free) with standrad google apps
Create the random subdomain (under domains) that google gives you.
Then under DNS overides choose the new subdomain and complete the CNAME record to be google.com
Check that this has taken affect. when you press the I have done this button google then checks. If you hae not done this it will assume that you do not own the domain and not allow you to continue.
For easy access to your mailbox, create a new subdomain (under domains) mail.yourdomain.com. Then under DNS overides set the CNAME to ghs.google.com
Then under domains for yourdomain.com create these MX records
Create the random subdomain (under domains) that google gives you.
Then under DNS overides choose the new subdomain and complete the CNAME record to be google.com
Check that this has taken affect. when you press the I have done this button google then checks. If you hae not done this it will assume that you do not own the domain and not allow you to continue.
For easy access to your mailbox, create a new subdomain (under domains) mail.yourdomain.com. Then under DNS overides set the CNAME to ghs.google.com
Then under domains for yourdomain.com create these MX records
Domain Priority
ASPMX5.GOOGLEMAIL.COM 30
ASPMX4.GOOGLEMAIL.COM 30
ASPMX3.GOOGLEMAIL.COM 30
ASPMX2.GOOGLEMAIL.COM 30
ALT2.ASPMX.L.GOOGLE.COM 20
ALT1.ASPMX.L.GOOGLE.COM 20
ASPMX.L.GOOGLE.COM 10
Sunday, 14 March 2010
Setting Up on WebFaction
WebFaction is quite popular among the Python and Django community, recently it has simplified Rails and other Ruby web frameworks.
Unlike other Web hosts they do not bundle a domain name, but these can be bought quite cheaply from www.gandi.net. I would then forward the MX records to google and get a gmail handler for your mail. You do not have to get a domain straight away by default you can use username.webfactional.com
First I had to install Passenger (I think this is also called Rack), I set the name to passenger.
This means that if you ssh/sftp/ftp into your account you will see ~/webapps/passenger/
Then I entered the Websites section then created a new subdomain devel.username.webfactional.com and set this to be type:passenger location:/
I had to wait sometime before these setting became active.
There article can then be followed for setting up a basic Sinatra over passenger (Rack).
NB: for a sinatra app you only need to install Passenger (not rails) and gem install sinatra (plus sequel / activerecord etc).
Unlike other Web hosts they do not bundle a domain name, but these can be bought quite cheaply from www.gandi.net. I would then forward the MX records to google and get a gmail handler for your mail. You do not have to get a domain straight away by default you can use username.webfactional.com
First I had to install Passenger (I think this is also called Rack), I set the name to passenger.
This means that if you ssh/sftp/ftp into your account you will see ~/webapps/passenger/
Then I entered the Websites section then created a new subdomain devel.username.webfactional.com and set this to be type:passenger location:/
I had to wait sometime before these setting became active.
There article can then be followed for setting up a basic Sinatra over passenger (Rack).
NB: for a sinatra app you only need to install Passenger (not rails) and gem install sinatra (plus sequel / activerecord etc).
Saturday, 13 March 2010
Sinatra set_cookie started failing
I recently started getting this error [1] in my Sinatra web application (after upgrading from 0.9.4 to 0.9.6)
Basically instead of
Source gitr
[1] undefined method `set_cookie' for
Basically instead of
set_cookie("foo", "bar")We now have to use:response.set_cookie("foo", "bar")Source gitr
Sunday, 28 February 2010
HTML CSS id vs class
Working on some websites again, been away from HTML and CSS for a while and having to remind myself the difference between ids and class's.
id is for unique elements on a page. There should only ever be one of each id on a page.
class is for many elements which you want to apply a custom style
CSS for id:
CSS for class:
Original Source :
http://www.tizag.com/cssT/cssid.php
id is for unique elements on a page. There should only ever be one of each id on a page.
< d i v id="navigation">< / d i v>
class is for many elements which you want to apply a custom style
< p r e id="prettyprint">Code1< / p r e>
< p r e id="prettyprint">Code2< / p r e>
CSS for id:
div#navigation {background-color: white;}CSS for class:
div.prettyprint {background-color: white;}Original Source :
http://www.tizag.com/cssT/cssid.php
Saturday, 6 February 2010
Sinartra limit blog posts displayed on a page
To limit the number of database elements returned in ActiveRecord is trivial but there is a little bit of work involved with getting the links setup to jump forward and backwards.
I have decided to use these [1,2,3] URLs to navigate the list of blog posts
[1] /blog : always the latest
[2] /blog/older : The next page of blog posts
[3] /blog/older/integer : a page of blog posts starting at integer the links provided will increment this by a fixed amount, but the route can accept any value.
NB: as allways I have inserted some extra space in to the code to get it to display rather than render, you may have to delete spaces after <.
My app.rb:
The views/blog/all.erb
I have decided to use these [1,2,3] URLs to navigate the list of blog posts
[1] /blog : always the latest
[2] /blog/older : The next page of blog posts
[3] /blog/older/integer : a page of blog posts starting at integer the links provided will increment this by a fixed amount, but the route can accept any value.
NB: as allways I have inserted some extra space in to the code to get it to display rather than render, you may have to delete spaces after <.
My app.rb:
require 'rubygems'
require 'sinatra'
require 'active_record'
$blogpath = "blog"
$blogs_per_page = 10
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => './db/blog.db'
)
class Posts < ActiveRecord::Base
end
get '/blog/?' do
@offset = 0
@posts = Posts.find(:all, :order => "id DESC", :limit => $blogs_per_page)
erb :'blog/all'
end
get '/blog/older/?' do
#This probably should be a redirect to /blog/older/$blogs_per_page
@offset = $blogs_per_page
@posts = Posts.find(:all, :order => "id DESC", :limit => $blogs_per_page, :offset => @offset)
erb :'blog/all'
end
get '/blog/older/:offset/?' do
@offset = params[:offset].to_i
@posts = Posts.find(:all, :order => "id DESC", :limit => $blogs_per_page, :offset => @offset)
erb :'blog/all'
end
The views/blog/all.erb
< %# This section adds control on top %>
< p>
< a href="/<%=$blogpath%>"> latest <%=$blogpath%>< /a>
<% if @offset>($blogs_per_page-1) %>
| < a href="/<%=$blogpath%>/older/<%=@offset-$blogs_per_page%>"> newer <%=$blogpath%>< /a>
<%end%>
| < a href="/<%=$blogpath%>/older/<%=@offset+$blogs_per_page%>"> older <%=$blogpath%>< /a>
< /p>
<%# This section lists all the Posts passed to it %>
<% for post in @posts %>
< h2>< a href="/<%=$blogpath%>/<%=post.id%>"> <%= post.title %>< /a>< /h2>
< p><%=post.body%>< /p>
<% end %>
Hyperlink to submit html forms
Some times you need a hyperlink to submit hidden form data. Example taken from javascript-coder.
This is a suggestion from VelocityReviews, just change the look of the button:
I ended up using a hyperlink to an URL that could then be intelligently parsed in my sinatra route, I would have had to have seperate get and post routes any way if I wantyed to stop the form appending ?lots=of&variab=les to the URL.
< form name="myform" action="handle-data.php">
Search: < input type='text' name='query' />
< a href ="javascript: submitform()">Search< / a>
< / form>
< script type="text/javascript">
function submitform()
{
document.myform.submit();
}
< / script>
This is a suggestion from VelocityReviews, just change the look of the button:
< input type="submit" value="Submit" style="Border: none; background: none">
I ended up using a hyperlink to an URL that could then be intelligently parsed in my sinatra route, I would have had to have seperate get and post routes any way if I wantyed to stop the form appending ?lots=of&variab=les to the URL.
Friday, 5 February 2010
Sinatra layouts vs templates
I must have missed this on my first pass of the Sinatra (sinatrarb) book. There is a very nice way to create a site template, called a layout.
Just create a file in views called layout.erb (or layout.haml if using haml) output yield where you want the body of the templates to be inserted. Class @variables can also be used.
This allows the basic layout of your site Headers, Footers and navigation panes to be controlled independently, a change in layout.erb is instantly applied across your whole site.
layout.erb
you app.rb (NB: no refference to layour.erb is made)
/views/about.erb
Just create a file in views called layout.erb (or layout.haml if using haml) output yield where you want the body of the templates to be inserted. Class @variables can also be used.
This allows the basic layout of your site Headers, Footers and navigation panes to be controlled independently, a change in layout.erb is instantly applied across your whole site.
layout.erb
< h t m l>
< h e a d>
< t i t l e><%= @title %>< / t i t l e>
< / h e a d>
< b o d y>
<%= yield %>
< / b o d y>
< / h t m l>
you app.rb (NB: no refference to layour.erb is made)
get '/about/?' do
@title = "About"
erb :about
end
/views/about.erb
Example about page
Sunday, 31 January 2010
SASS with Sinatra
Have started looking onto how to use use stylesheets with Sinatra. The easiest way way is to have a top level folder called Public with your main.css file.
This can be referenced from all pages as
Standard stylesheets have no have variables, they say they do but I could not get them to work. So I have started to look at compass which is a framwork for CSS! it based on haml which is another templating language like erb.
The Main Compass page. Integrating it with Sinatra.
Also see github for a basic example of using Sinatra and Compass.
Example of some SASS:
Compass uses SASS and is built on the blueprint layout system.
Blueprint Tutorials.
This can be referenced from all pages as
< h t m l>
< h e a d>
< t i t l e> example < / t i t l e>
< l i n k href="/main.css" rel="stylesheet" type="text/css" />
< / h e a d>
Standard stylesheets have no have variables, they say they do but I could not get them to work. So I have started to look at compass which is a framwork for CSS! it based on haml which is another templating language like erb.
The Main Compass page. Integrating it with Sinatra.
Also see github for a basic example of using Sinatra and Compass.
Example of some SASS:
!cdark = rgb(145, 129, 107)
!cdarker = rgb(125, 91, 95)
!clight = rgb(141, 189, 168)
!clighter = rgb(23 , 206, 143)
body
background-color: #{!cdark}
p
color: #{!clight}
Compass uses SASS and is built on the blueprint layout system.
Blueprint Tutorials.
Saturday, 19 December 2009
Sinatra Second Blog attempt
Example of how to setup a basic Sinatra web application.
This Sinatra app uses erb for the templating and active record for the database ORM. To get the cod eto show up I have had to change "< a" to <-a tags and insert extra space in other tags, unfortunately this means they are not quite cut and paste. To simplify The setup I have created a ./create_db.rb file.
./create_db.rb
The Main Application. ./app.rb
./views/readallblog.erb
./views/showoneblog.erb
./views/blog
Hopefully this has covered creating new, editing and retrieving database entries using ActiveRecord. I have probably missed some of the tricks to simplify writing Sinatra apps.
This Sinatra app uses erb for the templating and active record for the database ORM. To get the cod eto show up I have had to change "< a" to <-a tags and insert extra space in other tags, unfortunately this means they are not quite cut and paste. To simplify The setup I have created a ./create_db.rb file.
./create_db.rb
require 'rubygems'
require 'sequel'
# Connect to the database
DB = Sequel.sqlite('./db/blog.db')
unless DB.table_exists? :posts
DB.create_table :posts do
primary_key :id
varchar :title
text :body
end
# populate the table
DB[:posts].insert(:title => 'Post Man Pat', :body => "has a black and white cat" )
DB[:posts].insert(:title => 'Sandwiches', :body => "Peanut butter and Marmite, Yum")
DB[:posts].insert(:title => 'Leaves', :body => "Grow on trees")
end
class Posts < Sequel::Model
end
The Main Application. ./app.rb
require 'rubygems'
require 'sinatra'
require 'active_record'
#Load extra functions
require 'url_logic'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => './db/blog.db'
)
class Post < ActiveRecord::Base
end
$blogpath = "article"
get '/' do
erb :index
end
#Setup paths for blog
get '/article/?' do
@posts = Post.all()
erb :readallblog
end
#view a post
get '/article/:id/?' do
@posts = Post.find(params[:id])
erb :showoneblog
end
#edit a post
get '/article/:id/edit/?' do |id|
@posts = Post.find(params[:id])
erb :editblog
end
#Update post
put '/article/:id/?' do
@posts = Post.find(params[:id])
@posts.title = params['post']['title']
@posts.body = params['post']['body']
@posts.save
erb :showoneblog
end
#create a Post
post '/article/?' do
Post.create(
:title =>params['post']['title'] ,
:body => params['post']['body']
)
@posts = Post.all()
erb :readallblog
end
#delete an article
delete '/article/?' do
@posts = Post.find(params['post']['id'])
@posts.delete
@posts = Post.all()
erb :readblog
end
./views/readallblog.erb
readBlog All Posts
<%# $blogpath is global set in the main controller%>
<% for post in @posts %>
< h 1><-a href="/<%=$blogpath%>/<%=post.id%>"><%=post.id%>:<%= post.title %>< / a>
<%=post.body%>
<-a href="/<%=$blogpath%>/<%=post.id%>/edit">edit< / a>
<% end %>
< f orm method="post" action="/<%=$blogpath%>/">
< i nput name="_method" type="hidden" value="post" />
< d iv>
Title< i nput type="text" name="post[title]" value="title"/>
Body< i nput type="text" name="post[body]" value="body"/>
< b utton type="submit">Create
< / d iv>
< / f orm>
./views/showoneblog.erb
Show Single Post
< h 1><%=@posts.id%>:<%= @posts.title %>< / h 1>
< p ><%= @posts.body%>
<-a href="/<%=$blogpath%>/<%=@posts.id%>/edit">edit< / a>
./views/blog
Edit Single Post
< h 1><%=@posts.id%>:<%= @posts.title %>< / h 1>
<%=@posts.body%>
< f orm method="post" action="/<%=$blogpath%>/<%=@posts.id%>/">
< i nput name="_method" type="hidden" value="put" />
< d iv>
Title< i nput type="text" name="post[title]" value="<%=@posts.title%>"/>
Body< i nput type="text" name="post[body]" value="<%=@posts.body%>"/>
< b utton type="submit">Update
< / div>
< / f orm>
Hopefully this has covered creating new, editing and retrieving database entries using ActiveRecord. I have probably missed some of the tricks to simplify writing Sinatra apps.
Tuesday, 15 December 2009
Sinatra First Blog attempt
After getting Xcode for Snow leopard correctly installed and restarting. The basic sinatra works correctly.
hi.rb
----
Command line:
Then checkout 127.0.0.1:4567.
Turning it an almost blog, with some erb and an sqlite 3 database.
Assuming you have macports installed you can do (or look up installing sqlite3):
$ sudo port install sqlite3
hi.rb
----
Now create ./views/index.erb
----
$ ruby hi.rb and goto 127.0.0.1:4567.
If all goes well you should see some thing like this:
hi.rb
----
require 'rubygems'
require 'sinatra'
get '/hi' do
"Hello World!"
end
Command line:
$ gem install sinatra
$ ruby hi.rb
Then checkout 127.0.0.1:4567.
Turning it an almost blog, with some erb and an sqlite 3 database.
Assuming you have macports installed you can do (or look up installing sqlite3):
$ sudo port install sqlite3
cd Sinatra_dir
sqlite3 blog
#you are now in the sqlite command prompt
sqlite> create table posts (title text, body text );
sqlite> insert into posts values('title1','Very long article');
sqlite> insert into posts values('Sinatra Blog Post','text text text text text');
hi.rb
----
require 'rubygems'
require 'sinatra'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:dbfile => 'blog.db'
)
class Post < ActiveRecord::Base
end
get '/news/?' do
@posts = Post.all()
erb :index
end
Now create ./views/index.erb
----
HelloWorld!
<% for post in @posts %>
< h 1><%= post.title %>< / h 1>
< p ><%= post.body%>< / p>
<% end %>
$ ruby hi.rb and goto 127.0.0.1:4567.
If all goes well you should see some thing like this:
Labels:
Apple,
Blog,
Darwin Ports,
Mac Ports,
OS X,
Rails,
Ruby,
Sinatra,
Snow Leopard,
Web
Monday, 14 December 2009
Problems with Snow Leopard and Ruby Gems
UPDATE 2 (update 1 at the bottom with some extra ruby version info)
When you install Xcode make sure is is the latest version. I must have at some point installed the old Leopard version. then when things did not work reinstalled that same old version. I found xcode321_10m2003 in my downloads folder not the older one I had put in a software folder. You may still need to update Ruby to a new version.
Make sure you have the latest Xcode.
I have been trying to get the very simple Sinatra (a light ruby on Rails) setup working following the verysimple instructions on http://www.sinatrarb.com/
Make a file called hi.rb with this inside:
Then run these commands:
They fail with:
After removing the require 'rubygems', is it actually still required ?
To fix this I ran through the instructions at http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/
Their instructions worked well until the mysql gem which I do not require at the moment but do like to get my set up the same as the tutorial. I found the following line on stackoverflow.
Finally got the basic sinatra working by calling:
What is going on just thought I would check to see if calling the other ruby breaks it, but it works fine.
UPDATE
For completeness and to answer Spyro7's Question:
$ /usr/local/bin/ruby -v
> ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
$ /usr/bin/ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
When you install Xcode make sure is is the latest version. I must have at some point installed the old Leopard version. then when things did not work reinstalled that same old version. I found xcode321_10m2003 in my downloads folder not the older one I had put in a software folder. You may still need to update Ruby to a new version.
Make sure you have the latest Xcode.
I have been trying to get the very simple Sinatra (a light ruby on Rails) setup working following the verysimple instructions on http://www.sinatrarb.com/
Make a file called hi.rb with this inside:
require 'rubygems'
require 'sinatra'
get '/hi' do
"Hello World!"
end
Then run these commands:
$ gems install sinatra
$ ruby hi.rb
They fail with:
hi.rb:2:in `require': no such file to load -- rubygems (LoadError)
from hi.rb:2
After removing the require 'rubygems', is it actually still required ?
hi.rb:3:in `require': no such file to load -- sinatra (LoadError)
from hi.rb:3
To fix this I ran through the instructions at http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/
Their instructions worked well until the mysql gem which I do not require at the moment but do like to get my set up the same as the tutorial. I found the following line on stackoverflow.
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysqlplus
Finally got the basic sinatra working by calling:
$ /usr/local/bin/ruby hi.rbEven though which ruby returns /usr/local/bin/ruby, so why does ruby hi.rb not just work!
What is going on just thought I would check to see if calling the other ruby breaks it, but it works fine.
$ /usr/bin/ruby hi.rb
UPDATE
For completeness and to answer Spyro7's Question:
$ /usr/local/bin/ruby -v
> ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
$ /usr/bin/ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
Labels:
Apple,
Bash,
Darwin Ports,
GNU,
Leopard,
Mac,
Mac Ports,
OS X,
Programming,
Rails,
Ruby,
Snow Leopard,
Web
Monday, 7 December 2009
201st Post: Finally fixed wrapping text in pre tags
pre tags are used in html to maintain the display of whitespace as it is written in the html. This lends itself nicely to code snippets but unfortunately means that it does not wrap text nicely by default.
By adding this [1] to the embedded or external style sheets you can get text to behave nicely inside pre tags.
[1]
Original source:
http://labnol.blogspot.com/2006/10/html-css-trick-for-displaying-code.html
By adding this [1] to the embedded or external style sheets you can get text to behave nicely inside pre tags.
[1]
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}Original source:
http://labnol.blogspot.com/2006/10/html-css-trick-for-displaying-code.html
Saturday, 3 October 2009
Rails Menus using Partials
I have struggled to find a good tutorial on this, probably would not need it if I knew Rails better though. I would like to make a menu which is used through out my Ruby on Rails site, partials seem to be the correct thing to use.
under
app/views/
create a new folder 'shared'
and create a new file called _menu.rhtml.
'app/views/shared_menu.rhtml'
which contains the menu something like (sorry for the extra spaces only way I could stop it rendering):
'views/layouts/*.html.erb'
under
app/views/
create a new folder 'shared'
and create a new file called _menu.rhtml.
'app/views/shared_menu.rhtml'
which contains the menu something like (sorry for the extra spaces only way I could stop it rendering):
< id="menu">
< class="menubar">
< class="menubar">< href="http://127.0.0.1:3000/">Home< / a>< / l i>
< class="menubar">< href="http://www.blogger.com/Posts">Posts< / a>< /l i >
< class="menubar">< href="http://www.blogger.com/Tags">Tags< / a>< / l i>
< / u l>
< / d i v>Then add <%= render(:partial => "shared/menu") %> to all default layouts. in:'views/layouts/*.html.erb'
Subscribe to:
Posts (Atom)


