Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
Running: cucumber /Users/seivan/Downloads/bmabey-cucumber_rails-6c6a4fc3f52ab67c86733a5721886bb3f1891642/features/errors.feature --format=html
Feature: See errors
In order to fix errors
Developers should see Rails errors bubble up
Scenario: Visit nonexistent page
When I visit a nonexistent page
Then the Ruby error message should match 'No route matches "/does/not/exist"'
undefined method `should' for "undefined method `visit' for #<Object:0x1259aa8>":String (NoMethodError)
<% if !${1:list}.blank? -%>
<% for ${2:item} in ${1} -%>
$4<%= ${2}.$3 -%>
<% end -%>
<% else -%>
$5
<% end -%>
<%#= link_to "#{years.created_at.strftime("%Y")}", :action => "archive_months", :years => years.created_at.strftime("%Y")%>
<%= link_to "#{years.created_at.strftime("%Y")}", archive_months_blogpost_path(years.#{years.created_at.strftime("%Y")}) %>
from Portfolio.blogposts.models import Post, File
from django.contrib import admin
class FileInLine(admin.StackedInLine):
model = File
extra = 3
class PostAdmin(admin.ModelAdmin):
fieldsets = [
('Text', {'fields' : ['subject', 'content']}),
<h2>todo</h2>
{% for item in items %}
<p>{{item.name}} - Created at:{{item.created_at}}</p>
<p>{{item.description|linebreaksbr}}</p>
<p>{{item.updated_at}}</p>
{% url views.detail item.name %}
<hr />
{% endfor %}
<h2>todo</h2>
{% for item in items %}
<p>{{item.name}} - Created at:{{item.created_at}}</p>
<p>{{item.description|linebreaksbr}}</p>
<p>{{item.updated_at}}</p>
<a href="{% url stuff item.name %}">TEST</a>
<hr />
{% endfor %}
def detail(request, todo_name):
item = get_object_or_404(Todo, name=todo_name)
return render_to_response('detail_list.html', {'item' : item})
def save(self):
if not self.id:
self.created = datetime.datetime.now()
self.updated = datetime.datetime.now()
self.permalink = slugify(self.name)
super(Todo, self).save()
def save(self):
if not self.id:
self.created = datetime.datetime.now()
self.updated = datetime.datetime.now()
self.permalink = slugify(self.name)
super(Todo, self).save()