[Rails] Hartl RoR tutorial Section 5.3.4

2012-09-09 Thread Robonix
Hi can anyone help me with a snag, in Section 5.3.4? Having to do with *Listing 5.27, Prettier tests for the static pages, Terminal gives me this when I run the* bundle exec rspec spec/requests/static_pages_spec.rb Roberts-MacBook-Air:sample_app robertjoonkim$ bundle exec rspec

[Rails] [JOBS] Seeking a ROR Ninja

2012-09-09 Thread Geoff
Hi, two of my key skills are killing being invisible. Do I get the job? :P -- 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-talk@googlegroups.com. To unsubscribe from this group, send email

[Rails] Re: I wanna make a new rails community :)

2012-09-09 Thread rails2012
Is the community set up? I would like join as well. On Monday, September 3, 2012 6:33:12 PM UTC-7, Tima wrote: Hi everyone! I'm a newbie engineer. I started rails programming, but I'm learning alone and can't understand other rails cord so much. So I wanna have friend with other newbie

[Rails] [JOBS] Ruby on Rails position with 1saleaday.com

2012-09-09 Thread techjob4u
RUBY ON RAILS POSITIONS IN MIAMI LAKES, FL. I have included a summary of requirements if you feel you are a strong match I encourage you to apply with the link below. http://bullhorn.personified.com/client/jobInfoApplicationRespMgmt.action?EntityID=6690source=Passive_Sourcing

Re: [Rails] Hartl RoR tutorial Section 5.3.4

2012-09-09 Thread Colin Law
On 7 September 2012 02:15, Robonix robertjoon...@gmail.com wrote: Hi can anyone help me with a snag, in Section 5.3.4? Having to do with Listing 5.27, Prettier tests for the static pages, Terminal gives me this when I run the bundle exec rspec spec/requests/static_pages_spec.rb

Re: [Rails] [JOBS] Seeking a ROR Ninja

2012-09-09 Thread Alexandre Calvão
lol === *Alexandre Mondaini Calvão* *Nossa recompensa se encontra no esforço e não no resultado. Um esforço total é uma vitória completa*. [Ghandi] 2012/9/7 Geoff goo...@tidey.net Hi, two of my key skills are killing being invisible. Do I get the job? :P -- You received

[Rails] Re: [JOBS] Seeking a ROR Ninja

2012-09-09 Thread Vibhor
I'm a professional by nature and driven by passion. I have created quality software products from scratch, maintained un-documented legacy code and have also lead an agile software development team. I used to own a couple of critical features and release engineering for CA ERwin Data Modeler,

[Rails] Re: not seeing where name attribute is added to input fields

2012-09-09 Thread Matt Jones
On Sunday, 9 September 2012 00:49:30 UTC-4, John Merlino wrote: Without going to detail, I'll just show important code: text field is passed the name of object, could be a symbol (:user) or string (user[]). method is datbase attribute or virtual attribute. the options hash, among other

Re: [Rails] Re: I wanna make a new rails community :)

2012-09-09 Thread Panchdev Chauhan
Really a nice idea! Good for newbies like us. Please let me inform about the group. I want to join it too. On Sun, Sep 9, 2012 at 3:14 AM, rails2012 derek...@hotmail.com wrote: Is the community set up? I would like join as well. On Monday, September 3, 2012 6:33:12 PM UTC-7, Tima wrote:

[Rails] Re: [JOBS] Seeking a ROR Ninja

2012-09-09 Thread Mukesh yadav
Hi, I got 1 year experience in ror development. I am good in math.algorithm,phyiscs and problem solving I know ruby,rails,javascript,jQuery,elasticsearch,couchdb,mangodb,mysql. open source contribution http://code.google.com/p/bossliveinstaller/ I handled till now 4 project of ror. Regards,

[Rails] how to force the routing format being the request one

2012-09-09 Thread Erwin
I am trying to test the mobile way .. using mobile_fu and adding the :mobile format most of my test code is running adding :format = :mobile when necessary, but I wonder how when a controller respond to the :mobile format, the routing can use the request format In this test case ( contact form)

[Rails] Rails Syntax Change

2012-09-09 Thread rails2012
I am a newbie. Looking at some old text vs new. I see some changes: New: %= yield(:title) % Old: %= @title % New: #{base_title} | Home Old: @base_title + | Home Can you tell me when they got changed? Are the new syntax now the preferred way? Are they more elegant? Thanks! -- You

[Rails] Re: dash symbol

2012-09-09 Thread John Merlino
ok this was oversight on my part. First of all, instead of using the helper helper in the console, you can directly access actionview just by specifying the constant. So ActionView::Helpers::FormBuilder.instance_methods would work. But what was oversight is that I was wondering that FormBuilder's

[Rails] What module are the % % and %= % defined in?

2012-09-09 Thread John Merlino
What module of ActionView are the % % and %= % defined in? -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: What module are the % % and %= % defined in?

2012-09-09 Thread John Merlino
ok ActionView::Base includes this module ::ERB::Util and ERB class seems to do so On Sep 9, 1:53 pm, John Merlino stoici...@aol.com wrote: What module of ActionView are the % % and %= % defined in? -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

Re: [Rails] Rails Syntax Change

2012-09-09 Thread Walter Lee Davis
On Sep 9, 2012, at 12:10 PM, rails2012 wrote: I am a newbie. Looking at some old text vs new. I see some changes: New: %= yield(:title) % Old: %= @title % Not sure about this one. New: #{base_title} | Home Old: @base_title + | Home The new way creates one fewer String object, and

[Rails] mattr_accessor inside a class

2012-09-09 Thread John Merlino
Rails extends Ruby with mattr_accessor (Module accessor). As Ruby's attr_accessor generates getter/setter methods for instances, mattr_accessor provide getter/setter methods at the module level. In below example, you see that mattr_accessor declared in the class context of LookupContext. It's

[Rails] Re: Rails Syntax Change

2012-09-09 Thread 7stud --
New: %= yield(:title) % Old: %= @title % @title is set in a controller, and to separate views from what goes on in a controller, you shouldn't set a title of an html page in a controller. The method yield(:title) looks for the value of a title variable in the view, which can be set like

[Rails] Re: What module are the % % and %= % defined in?

2012-09-09 Thread 7stud --
ERB is a feature of ruby. See here: http://ruby-doc.org/stdlib-1.9.3/libdoc/erb/rdoc/ERB.html -- 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 post to this group, send email to

[Rails] LookupContext missing constructor

2012-09-09 Thread John Merlino
The title of this message is wrong. LookupContext must have a constructor: ActionView::LookupContext.new(nil) = #ActionView::LookupContext:0x007f8e84755d18 @details_key=nil, @details={:handlers=[:erb, :builder, :coffee], :formats=[:html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml,

[Rails] Re: LookupContext missing constructor

2012-09-09 Thread John Merlino
I think I found it on line 170: def initialize(view_paths, details = {}, prefixes = []) @details, @details_key = {}, nil @skip_default_locale = false @cache = true @prefixes = prefixes @rendered_format = nil self.view_paths = view_paths

[Rails] Case of lost milliseconds

2012-09-09 Thread Pradeep Singh
Can anyone explain where are the milliseconds getting lost - Completed 200 OK in 438ms (Views: 145.0ms | ActiveRecord: 15.0ms) Completed 200 OK in 378ms (Views: 206.0ms | ActiveRecord: 2.0ms) Completed 200 OK in 275ms (Views: 62.0ms | ActiveRecord: 35.0ms) This is by far the most time

[Rails] misleading variable value

2012-09-09 Thread John Merlino
I'm going to invoke action view base from console, passing a string object: 1.9.3p0 :016 ActionView::Base.new('app/views') = #ActionView::Base:0x007fd95c5e8f48 @_config={}, @view_renderer=#ActionView::Renderer:0x007fd95c5e8c50 @lookup_context=#ActionView::LookupContext:0x007fd95c5e8ed0

[Rails] get property of a model data

2012-09-09 Thread Soichi Ishida
Rails 3.1.3 This must be a simple matter, but since I am stupid enough to misunderstand something. In a controller, I would like to create AND search for another model if they match in terms of the properties. def create @take = current_user.takes.build(params[:take]) # search for

[Rails] Re: get property of a model data

2012-09-09 Thread Pradeep Singh
The problem may be at exists? What's the status of the @result object? Is it nil? Does it have any value? What do you get if you inspect it or print it? What's the exact error you get? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: get property of a model data

2012-09-09 Thread Pradeep Singh
Looking at ruby docs, this is the explanation for the method - Evaluates to true if this resource is not new? and is found on the remote service. Using this method, you can check for resources that may have been deleted between the object’s instantiation and actions on it.

[Rails] Re: get property of a model data

2012-09-09 Thread Soichi Ishida
What's the status of the @result object? Is it nil? Does it have any value? Since it passed the if part, 'if @result.exists?', @result does exist. I have confirmed that. What's the exact error you get? The error is simply undefined method `user_id' for -- Posted via

[Rails] Re: get property of a model data

2012-09-09 Thread Pradeep Singh
Item has a belongs_to :user, right? In any case, what do you get when you print or inspect @result? -- 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 post to this group, send email to

[Rails] Re: get property of a model data

2012-09-09 Thread Soichi Ishida
Pradeep Singh wrote in post #1075257: Item has a belongs_to :user, right? yes In any case, what do you get when you print or inspect @result? if I print it, #ActiveRecord::Relation:0x0100f24800 is what I get. -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] Re: get property of a model data

2012-09-09 Thread Javier Quarite
On Sun, Sep 9, 2012 at 9:45 PM, Soichi Ishida li...@ruby-forum.com wrote: Pradeep Singh wrote in post #1075257: Item has a belongs_to :user, right? yes In any case, what do you get when you print or inspect @result? if I print it, #ActiveRecord::Relation:0x0100f24800 is what I

[Rails] Re: Re: get property of a model data

2012-09-09 Thread Soichi Ishida
Try @result.to_yaml to see its attributes I got the following #ActiveRecord::Relation:0x0100dedae0--- - !ruby/object:Take attributes: id: 8 flight_name: soichi flight_num: departure: 2012-09-21 check_in: true weight: 5 created_at: 2012-09-10

[Rails] Re: get property of a model data

2012-09-09 Thread Soichi Ishida
sorry, 'Item' is actually named 'Take' here. -- 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 post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this

[Rails] Re: get property of a model data

2012-09-09 Thread Pradeep Singh
I see, so the object you're getting is of type Relation. Just for kicks I tried this in rails console for my own Item class. Same thing happens to me - no method user_id. You need to get the item object from the @result object. This works - item = @result.first item.user_id There might be

[Rails] Re: get property of a model data

2012-09-09 Thread Soichi Ishida
item = @result.first item.user_id It worked fine! Thank you very much. Now I need to study 'type Relation' :) soichi -- 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 post to this group,

[Rails] Rails error: invalid byte sequence in UTF-8

2012-09-09 Thread Carlos Eduardo Ribeiro
Hello, i have a app on rails 3.2.1 and i use a jquery lib called jQuery Timelinr 0.9.5: http://www.csslab.cl/2011/08/18/jquery-timelinr/ but, when i use it on a .erb view, i got a error: Showing * /home/carlos.ribeiro/projetos/amarribo/app/views/conheca/historico.html.erb* where line *#59*

Re: [Rails] Rails error: invalid byte sequence in UTF-8

2012-09-09 Thread Javier Quarite
Maybe this help http://stackoverflow.com/questions/7837350/sprockets-encoding-error-on-js-file-invalid-utf-8-byte-sequence https://github.com/sstephenson/sprockets/issues/87#issuecomment-1344825 -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

Re: [Rails] Rails error: invalid byte sequence in UTF-8

2012-09-09 Thread Carlos Eduardo Ribeiro
when i execute this rake task https://gist.github.com/1301199/a19adcb7687f2adfc927c9e8da3d716960833797 , don't return me errors, all file is ok.. 2012/9/10 Javier Quarite jquari...@gmail.com Maybe this help

[Rails] Authlogic: current user is nil, after adding http basic authentication in production environment

2012-09-09 Thread Loganathan Sellapa
Hi All, I have implemented http basic authentication in my application, after the implementation of basic http authentication, current user is always nil in production mode. Pasted below my code for your reference. In Application controller: def authenticate_user if (Rails.env.production?

Re: [Rails] Rails error: invalid byte sequence in UTF-8

2012-09-09 Thread Javier Quarite
I've used this file https://github.com/juanbrujo/jQuery-Timelinr/blob/master/js/jquery.timelinr-0.9.5.js I've downloaded it and then in irb did f = File.read(/path/to/jquery.timelinr-0.9.5.js) f.valid_encoding? = true f.encoding = #Encoding:UTF-8 maybe there's a typo in the file you are using

[Rails] Re: Rails Syntax Change

2012-09-09 Thread rails2012
Do you mean #{base_title} | Home is more efficient because it doesn't create a new String object? (You said second one... I am not sure if I got that right.) (I wonder why I don't get email notifications when replies are sent... I am pretty sure I clicked Email updates to me...) New:

Re: [Rails] Rails error: invalid byte sequence in UTF-8

2012-09-09 Thread Carlos Eduardo Ribeiro
i'm using this file too.. in irb is ok, but when is in rails, a i got the problem.. 2012/9/10 Javier Quarite jquari...@gmail.com I've used this file https://github.com/juanbrujo/jQuery-Timelinr/blob/master/js/jquery.timelinr-0.9.5.js I've downloaded it and then in irb did f =

[Rails] Object Efficiency

2012-09-09 Thread rails2012
So I am using rufus-scheduler to call a controller which in turn calls an email receiver to check emails... In my controller, I have an instance method called checkEmail In my rufus config file, I have to call MyController.new.checkEmail. Now I set it to run every 5 minutes. So the system

[Rails] Re: Rails Syntax Change

2012-09-09 Thread 7stud --
Well, if you are getting posts on the mailing list, then I guess you don't get the edits, which are allowed for 15 minutes. I corrected that error in my post--right after I posted. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: Rails Syntax Change

2012-09-09 Thread 7stud --
Derek Lin wrote in post #1075271: Do you mean #{base_title} | Home is more efficient because it doesn't create a new String object? It certainly does create a new String object--that's what the quotes do; they tell Ruby, Please create a new String object for me. The difference is that the

[Rails] flash[:notice] not working

2012-09-09 Thread Manoj M.
Hi, anybody please help me out,am using rails 3 but using this flash[:notice] doesnot works, i have used this in controllers. any idea ? please help. Regards, Manoj -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby