Skip to content

Commit

Permalink
Fixed new Manifestation form
Browse files Browse the repository at this point in the history
  • Loading branch information
wdenton committed May 6, 2010
1 parent 13be27a commit 5f90459
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/expressions_controller.rb
Expand Up @@ -76,8 +76,8 @@ def edit
def create
realizer_name = params[:name]
realizer_type = params[:entity_type]
@expression = Expression.new(params[:expression])

@expression = Expression.new(params[:expression])
@realizer = realizer_type._as_class.find_or_create_by_name(realizer_name)

respond_to do |format|
Expand Down
2 changes: 1 addition & 1 deletion app/views/manifestations/_form.html.erb
Expand Up @@ -2,7 +2,7 @@

<tr>
<td>Title</td>
<td><%= form.text_field :title, :size => 50 %><td>
<td><%= form.text_field :title, :size => 50, :value => @e.title %><td>
</tr>

<tr>
Expand Down
8 changes: 4 additions & 4 deletions app/views/manifestations/new.html.erb
Expand Up @@ -2,14 +2,14 @@

<h1>Add a manifestation</h1>

<% e = Expression.find(params[:expression_id]) %>
<% @e = Expression.find(params[:expression_id]) %>

<p>

Work:
<%= link_to "#{e.reification.work.anchor_text}", @e.reification.work %>
<%= link_to @e.reification.work.anchor_text, @e.reification.work %>
<br />
Expression: <%= link_to e.anchor_text, e %>
Expression: <%= link_to @e.anchor_text, @e %>

</p>

Expand All @@ -27,7 +27,7 @@ Producer:

<%= render(:partial => 'form', :object => f) %>
<%= hidden_field (:manifestation, :expression_id, :value => params[:expression_id]) %>
<%= hidden_field_tag ('expression_id', :value => params[:expression_id]) %>

<p>
<%= f.submit "Create" %>
Expand Down

0 comments on commit 5f90459

Please sign in to comment.