Search Results

Search found 4 results on 1 pages for 'fursie'.

Page 1/1 | 1 

  • yield in ERB without rails

    - by fursie
    Hi How can I use yield for template inheritance in erb? I want to use erb in a plain ruby CGI script and want to use a base template and subtemplate like it Rails with the application template does.

    Read the article

  • How to render in rails metal?

    - by fursie
    Hi I want to use a custom template file which shoud use the base layout file (app/view/layouts/application.html.erb) in a Rails metal code. Can somebody give me some hints what I need to require or how I can do that?

    Read the article

  • translate database fields with rails

    - by fursie
    hi I know about the built-in I18n in Rails, but how can I select a database field per locale? My model structure is something like this: title #default (englisch) title_de #(german) title_it #(italian) In my template I want to be able to write only <%= @model.title %> and should get the value in the right language. Is there a plugin or a solution to use different fields per different locale settings with a structure like mine?

    Read the article

  • How can I test ActiveRecord::RecordNotFound in my rails app?

    - by fursie
    Hi, I have this code in my controller and want to test this code line with a functional test. raise ActiveRecord::RecordNotFound if @post.nil? which assert method should I use? I use the built-in rails 2.3.5 test framework. I tried it with this code: test "should return 404 if page doesn't exist." do get :show, :url => ["nothing", "here"] assert_response :missing end but it doesn't work for me. Got this test output: test_should_return_404_if_page_doesn't_exist.(PageControllerTest): ActiveRecord::RecordNotFound: ActiveRecord::RecordNotFound app/controllers/page_controller.rb:7:in `show' /test/functional/page_controller_test.rb:21:in `test_should_return_404_if_page_doesn't_exist.'

    Read the article

1