Skip to content

Commit

Permalink
Start on entries controller and views
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrmurphy committed Nov 14, 2010
1 parent ba4a308 commit b84b83f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/controllers/entries_controller.rb
@@ -0,0 +1,18 @@
class EntriesController < ApplicationController

def new
end

# def create
# @entry = current_user.entries.build(params[:entry])
# if @entry.save
# flash[:success] = "Entry created!"
# redirect_to root_path
# else
# render 'pages/home'
# end
# end

def destroy
end
end
2 changes: 2 additions & 0 deletions app/helpers/entries_helper.rb
@@ -0,0 +1,2 @@
module EntriesHelper
end
2 changes: 2 additions & 0 deletions app/views/entries/create.html.erb
@@ -0,0 +1,2 @@
<h1>Entries#create</h1>
<p>Find me in app/views/entries/create.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/entries/destroy.html.erb
@@ -0,0 +1,2 @@
<h1>Entries#destroy</h1>
<p>Find me in app/views/entries/destroy.html.erb</p>
10 changes: 10 additions & 0 deletions app/views/shared/_entry_form.html.haml
@@ -0,0 +1,10 @@
= form_for @entry do |f|
-# = render 'shared/error_messages', :object => f.object
.word
= f.label :word
= f.text_field :word
.definition
= f.label :definition
= f.text_area :definition
.actions
= f.submit "Add to dictionary"
1 change: 1 addition & 0 deletions app/views/shared/_error_messages.html.haml
@@ -0,0 +1 @@
-# Shared partial goes here

0 comments on commit b84b83f

Please sign in to comment.