[Rails] Active Record Associations and papermill

2010-06-02 Thread DmitryPush
I have a model Chapter I figured out how to add assets to chapter through papermill plugin. Now the question: how can i add additional description to each asset? It can look like: chapter has_many items item belongs_to chapter item has_one papermill_asset papermill_asset belongs_to item But i

[Rails] Re: Rails 3 Error:uninitialized constant ActiveResource::Base

2010-05-27 Thread DmitryPush
Thx! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options,

[Rails] Rails 3 Error:uninitialized constant ActiveResource::Base

2010-05-23 Thread DmitryPush
I'v just install rails3 for try it out. I was following getting started guide: rm public/index.html, change routes... and then i try to open page i'v got an error. OS: ubunto 10.04 Rails info: dp...@dpush-desktop:~/rails_proj/blog/public$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249)

[Rails] Rails 3 Error:uninitialized constant ActiveResource::Base

2010-05-23 Thread DmitryPush
I'v just install rails3 for try it out. I was following getting started guide: rm public/index.html, change routes... and then i try to open page i'v got an error. OS: ubunto 10.04 Rails info: dp...@dpush-desktop:~/rails_proj/blog/public$ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249)

[Rails] Re: Security issue in app

2010-04-05 Thread DmitryPush
%=h @text_from_user % The point is 'h' helper. http://guides.rubyonrails.org/getting_started.html - will be very useful to read. Good luck. On Apr 5, 2:11 pm, Tushar Gandhi li...@ruby-forum.com wrote: Hi, I am facing a following problem:-  I have app in which user can edit his/her personal

[Rails] Re: providing feedback to users

2010-04-02 Thread DmitryPush
It can by manage if you you using AJAX, and it's many ways to do it, there one: just show some div id='waiter' style='dislpay:none'pleas wait/div on 'ajax start' event and hide this one on 'ajax end' event. If you choose jqure (jquery.com) it would look like: $(#loading).ajaxStart(function(){

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
in your link I can see: beiratkozas_controller.rb subscriptions_controller.rb but where is students_controller.rb (StudentsController) ? Dose ruby asking you the same question?:) On Apr 2, 4:04 pm, WSzP c...@ctdd.ro wrote: Any ideas? I still can't find out why this does not work, or how to

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
In addition, it happens because you using % form_for(@student) do | f| % helper if you look in HTML code (this helper appears to) you can find that request will be send to student controller... On Apr 2, 4:15 pm, DmitryPush dmitryp...@gmail.com wrote: in your link I can see

[Rails] Re: Two controllers with create using the same model

2010-04-02 Thread DmitryPush
so now we can see exactly what rails told you - it is now create method in student controller. :) and why you view requesting student controller i already told you. :) On Apr 2, 4:39 pm, WSzP c...@ctdd.ro wrote: Hello, Thanks a lot, and here is my students_controller.rb:http://pastie.org/900218

[Rails] Re: any body can help me ?? why is this happen??

2010-03-31 Thread DmitryPush
(0.29*100).to_s.to_i will return what you expect. On Mar 31, 10:27 am, Jimish Jobanputra li...@ruby-forum.com wrote: Scary! irb(main):019:0 (0.57 * 100).to_i = 56 irb(main):020:0 (0.58 * 100).to_i = 57 This is totally out of my understanding Will look into core... seems like some

[Rails] Re: regular expression

2010-03-31 Thread DmitryPush
This is very good tutorial (don't be upset its for perl, in ruby regexp works pretty the same) http://sunsite.ualberta.ca/Documentation/Misc/perl-5.6.1/pod/perlretut.html a. - [] - causing group of symbols, for eg /[bcr]at/ matches 'bat, 'cat', or 'rat' b. 1 - it's a first math ($1 in perl) c.

[Rails] Re: regular expression

2010-03-24 Thread DmitryPush
$ irb module$block.item[/\$([^.]*)\./,1] = block -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: regular expression

2010-03-24 Thread DmitryPush
address: 64 Sish Lane, Stevenage, Herts, SG1 3LS Company number: 5452840 On 24 March 2010 07:15, DmitryPush dmitryp...@gmail.com wrote: $ irb module$block.item[/\$([^.]*)\./,1] = block -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Problem Installing Passenger

2010-03-24 Thread DmitryPush
try to install 'ruby-devel', in ubuntu it 'gem install ruby-devel' I guess Is it helps? On Mar 24, 3:17 pm, Christophe Decaux christophe.dec...@gmail.com wrote: Thanks Leonardo, I installed everything with gem Anyone else ? Le 24 mars 2010 à 13:13, Leonardo Mateo a écrit : On Wed, Mar 24,

[Rails] Re: Restful create URL

2010-03-23 Thread DmitryPush
As you now URL its a GET method, but according RESTful rules create it's a POST method. Rails defines seven controller methods for RESTful resources by convention. They are: Action HTTP Method Purpose - indexGET

[Rails] Re: Rail Quickstart Guide: Always receiving template missing errors.

2010-03-21 Thread DmitryPush
If you read carefully http://guides.rubyonrails.org/getting_started.html you can find that in your routes.rb file have to be following lines map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' I also new in RoR and I don't know why you wrote map.connect 'home/

[Rails] Re: Rail Quickstart Guide: Always receiving template missing errors.

2010-03-19 Thread DmitryPush
Are you sure you don't have a typo, and name of your template looks exactly like that app/views/posts/index.html.erb ? if it's not could you provide here your posts controller, routs and index view On Mar 19, 3:14 am, Stone vtgbe...@gmail.com wrote: Hello, Upon going through the rails

[Rails] Re: Facebook style photo uploader

2010-03-19 Thread DmitryPush
also you can take a look on Uploadify it's not like in Facebook but it's pretty simple to install and use. demo: http://www.uploadify.com/demo/ Rails and uplodify: http://casperfabricius.com/site/2009/03/26/uploading-multiple-files-with-progress-indicator-using-jquery-flash-and-rails/

[Rails] Re: Send Java script variable to a controller

2010-03-19 Thread DmitryPush
Here is non ajax method(but ajax pretty the same): var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; #or get f.action = this.href; var m = document.createElement('input'); m.setAttribute('type', 'hidden');

[Rails] Re: REST, Internet Explorer and the banned DELETE method

2010-03-17 Thread DmitryPush
Hi, You just cat you following in your view: %= link_to 'Destroy', photo, :confirm = 'Are you sure?', :method = :delete % and it appear in browser to that: a onclick=if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f);

[Rails] Re: REST, Internet Explorer and the banned DELETE method

2010-03-17 Thread DmitryPush
*your just CAN ADD (sorry for this typo) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: REST, Internet Explorer and the banned DELETE method

2010-03-17 Thread DmitryPush
by the way, the same story about PUT form method=post id=edit_photo_51 class=edit_photo action=/ photos/51 div style=margin: 0pt; padding: 0pt; display: inline; input type=hidden value=put name=_method input type=hidden value=LgNwcxaXQ3+NT95f1SJYo1ZOUfXMFtQimzSzDmjJM3g=

[Rails] RESTful photo album

2010-03-09 Thread DmitryPush
Hi, all! I'm new in Rails. I've read Agile web development and now I want made my very first rails application - photo album. But I don't know how to design it RESTful. For example I have 3 chapters and 100 photos on each one and i want list only 10 photos on page. How should look request for

[Rails] Re: RESTful photo album

2010-03-09 Thread DmitryPush
Thx! Sounds good. I'll try it and later I'll post hear where it drive me to:) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send