Colin Law wrote in post #1146603:
>
> But as you said yourself the tutorial does "create a view without a
> model".  It is easy.  All you have to do is make a controller file
> controllers/somename_controller.rb, put the desired actions in it,
> create view files such as views/somename/theaction.html.erb and put
> the routes in routes.rb.  I don't know which bit you are having a
> problem with.
>
That is what I did, I have create new controller named saisie, and in 
views I have /saisie/index then I wrote in the controller:
@test="failed"
def index
  def change
    @test="succed"
  end
end

But I can't call my methode 'change' with a button like I did in other 
view like this:

<%= link_to t('.change', :default => t("helpers.links.change")),
                      change_saisie_path(task),
                      :method => :put,
                      :class => 'btn btn-mini'%>
I think it's because I used this when I have a model that is not the 
case here. Do you know other way to call my methode?
>
> I believe railstutorial uses rails 4.
>
In the gemfile of his project on gitHub -> gem 'rails', '3.0.12'
That's why I said he used rails 3.

Fab

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9f3e8313e34e309b5ac50cc4489e0e0c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to