In this method call:
meth1(meth2(meth3))
...which value has has to be computed first so that meth1 can return?
--
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
7stud -- wrote in post #1089991:
>
> And here is how to correct the problem:
>
> class Dog
> def title=(val)
> @title = val.capitalize
> end
>
> def do_stuff
> self.title = "mr."
> title + " Dog"
> end
> end
>
> p
Frederick Cheung wrote in post #1089897:
>
> Because rails doesn't use individual instance variables to store your
> attributes (whether they've been marked as attr_accessible makes no
> difference)
>
> title = "foo"
>
> Doesn't work because ruby assumes that you want to assign to the local
> varia
You don't give any hint as to what went wrong. Have you tried the one
click installer here:
http://railsinstaller.org/
I wouldn't use windows for anything.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails
Nirav Bhatu wrote in post #1089902:
> I am shocked that we can change the value of constant in ruby!!
>
What about this:
class Dog
def initialize(password)
@secret = password
end
end
d = Dog.new("flower52")
puts d.instance_eval("@secret")
--output:--
flower52
--
Posted via http://www.
Another example:
data = Array.new(10, nil)
p data
--output:--
[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
p data.size
--output:--
10
puts data[0].province
--output:--
1.rb:4:in `': undefined method `province' for nil:NilClass
(NoMethodError)
--
Posted via http://www.ruby-forum.com/
obj = Object.new
obj.class_eval {}
--output:--
1.rb:2:in `': undefined method `class_eval' for
# (NoMethodError)
puts Kernel.instance_methods(false).include? :class_eval
--output:--
false
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]
$ rvm use 1.8.7
$ ru
Have you checked the free online version of the book for the latest
updates?
--
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.c
Methods attach themselves to whatever the current class is when they are
defined. If self is a class when the method is defined, then the method
becomes an instance method in that class. If self is not a class when
the method is defined, then the current class is self's class.
puts self
puts
Dheeraj Kumar wrote in post #1077704:
> It would be more correct to say that Object includes the Kernel module.
> see http://ruby-doc.org/core-1.9.3/Object.html
>
When a class includes a module, ruby creates an anonymous class out of
the module and inserts into the inheritance chain directly abov
John Merlino wrote in post #1077564:
> For the method invocation expression o.m, Ruby performs name
> resolution with the following steps: 1) first, it checks the
> eigenclass of o for singleton methods named m. 2) If no method m is
> found in the eigenclass, Ruby searches the class of the o for an
1) Post the definition of private.
2) Execute this program:
puts 'hello'
3) What conclusions do you draw from that?
--
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
> I've never seen that require in any gems on the web
That's because most of the time when you require something, it is a gem,
and gems are installed in specific directories that ruby searches when
you require something. You can see a list of the directories ruby
searches when you require some
> Also to reference the class, I still needed to prefix the module name
> which is also strange because I am requiring it!
Look up the difference between 'require' and 'include'.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Gro
> But I don't get the principle.
There is no such principle as the Sandwich principle. The principle is
Don't Repeat Yourself(DRY). So if you find yourself writing the same or
similar code over and over again, try to figure out a way to extract the
repeated part into a method. That way you c
1) Very good. Now you should try to determine what "Ruby on Rails" is,
and whether your questions have anything to do with Ruby on Rails.
2) Read a tutorial on ruby exception handling, or better yet buy the
book "Beginning Ruby":
http://beginningruby.org/
and read that before trying to do the
1) Did you try shutting your command window and opening a new one and
then typing rails --verson?
2) Post the value of your PATH environment variable.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk"
> Module.is_a?(Class)
Module inherits from Object, Object is an instance of Class.
> Object.is_a?(Module)
Object is an instance of Class, Class inherits from Module.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
Javier Quarite wrote in post #107:
> Maybe this helps:
>
> http://api.rubyonrails.org/classes/Enumerable.html#method-i-group_by
> http://railscasts.com/episodes/29-group-by-month
>
> You may do @users.group_by(&:id) ... but I'm not sure what you have in
>
Each user has a unique id, so what doe
>…looking for a module named Rendering in the ActionController
> namespace, since that is the namesapce that Base is defined in???
module Rendering
def greet
puts 'hi'
end
end
module ActionController
class Base
include Rendering
end
end
obj = ActionController::Base.new
obj.greet
class User
attr_accessor :id, :name
def initialize(id, name)
@id = id
@name = name
end
end
charlie = User.new(9, 'Charlie')
fred = User.new(1, 'Fred')
sally = User.new(3, 'Sally')
@users = [
fred,
fred,
fred,
sally,
charlie,
sally
]
user_counts = Hash.new(0)
@users.ea
roh wrote in post #1076535:
> if we want to get the highest 3 values , then how can we write the code
> for
> that .?
data = [10, 20, 70, 60, 40, 30]
ordered_data = data.sort_by {|num| -num}
p ordered_data
p ordered_data[0..2]
--output:--
[70, 60, 40, 30, 20, 10]
[70, 60, 40]
--
Posted via ht
Also,
p Dog.ancestors
--output:--
[Dog, Cat, Animal, Object, Kernel, BasicObject]
--
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@googleg
7stud -- wrote in post #1076203:
>
> Modules that are included are inserted into the inheritance chain.
> Where in the chain?
>
>
>
> module Cat
> def greet
> puts 'meow'
> end
> end
>
> class Animal
> def greet
> puts
class Animal
def greet
puts 'hi'
end
end
class Dog < Animal
def greet
super
end
end
d = Dog.new
d.greet
--output:--
hi
module Animal
def greet
puts 'hi'
end
end
class Dog
include Animal
def greet
super
end
end
d = Dog.new
d.greet
--output:--
hi
Modul
1)
class Dog
module Cat
puts 'hello'
end
end
--output:--
hello
2)
> Do all the methods of the module get copied over to base
Never.
3) I don't know.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Ra
<%= form_for @instruction_user,
<%= f.text_field :remark_tl%>
Have you tried:
params[:instruction_user][:remark_tl]?
--
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 pos
John Merlino wrote in post #1075232:
> 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 t
John Merlino wrote in post #1075500:
> Rails code:
>
> Accessors.send :define_method, :"default_#{name}", &block
>
> Accessors.module_eval <<-METHOD, __FILE__, __LINE__ + 1
> def #{name}
> @details.fetch(:#{name}, [])
> end
>
> def #{name}=(value)
> value = value.present? ? Array(value)
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
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 Google
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 rubyonrails-t
> 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 lik
Sorry, my tests were inside an integration('request') test:
/spec/requests/dog_pages_spec.rb
In my rails tutorial book, it says that inside a controller test, you
can't use urls at all, e.g
get '/about'
get '/'
...you can only do:
get 'actionA'
get 'actionB'
--
Posted via http://www.ruby-fo
...as stated in the tutorial here:
3.2 Creating the Blog Application
To begin, open a terminal, navigate to a folder where you have rights to
create files, and type:
$ rails new blog
This will create a Rails application called Blog in a directory called
blog.
You can see all of the switches t
> The problem isn't in the route, but in the strange behavior of get and
> post, instance methods of ActionController::TestCase::Behavior
My rspec tests seem to work as you would expect. I used a controller
named Dogs to test the routes:
require 'spec_helper'
describe "Dogs Pages" do
descr
How about:
controller :sessions do
match '/login' => :login_create, :via => :post
match '/login' => :login, :via => :get
match '/logout' => :logout
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Gr
If you don't even know what the posts in this thread say, why bother
posting anything?
--
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@goog
> It is not inconsistent.
Okay, perhaps it's more correct to say that Rails is flat out wrong.
Rails complains that I need an action when there isn't one, which is
false.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "R
How about trying:
.../your_app$ bundle install
And then
.../your_app$ bundle exec rake db:migrate
--
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 rubyonra
Thanks for the response Frederick Cheung.
I don't like this 'default rendering', nor the misleading error message
saying the action is missing--but I guess I'll have to live with it. A
route and view is all that's necessary to render a page.
--
Posted via http://www.ruby-forum.com/.
--
You
> It's a feature of Rails. It's a problem if it causes problems.
(Note: nothing in this post has anything to do with rspec.)
For me, that routing behavior is causing problems. Here's why: if I add
a route such as:
get "static_pages/dog"
...and then enter the url http://localhost:3000/static_p
> products list should be loaded into the view when
> app starts.
In Rails, apps don't start. Instead, web browsers send requests to
urls, which your app then directs to the proper controller and action.
So I would start by reading the Rails Guide about routing to figure out
how to write simpl
So this is a route "problem"?
--
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 group, send email t
Thanks for the response. Here is my routes.rb:
SampleApp25::Application.routes.draw do
get "static_pages/home"
get "static_pages/help"
get "static_pages/about"
get "static_pages/contact"
# The priority is based upon order of creation:
# first created -> highest priority.
# Sampl
ction[0m
Yet here is my controller:
class StaticPagesController < ApplicationController
end
Previously, I had actions in my controller, but I wanted to see if the
tests would fail without the actions, and I fully expected them to fail,
but they won't. I have everything at githu
The rspec test looks like this:
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the h1 'Sample App'" do
visit '/static_pages/home'
page.should have_selector('h1', :text => 'Sample App')
end
end
end
My controller looks like th
Chirag Singhal wrote in post #1023053:
> First you have to setup your laptop for git usage similar to what you
> had
> done for your PC.
> 1. Install Git
> 2. Generate SSH keys
> 3. Add your laptop's public key to your github account (you can add as
> many
> keys as you want, so do not modify your
Open up spec_helper.rb and copy and paste lines 95-110.
--
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 fro
Thanks!
--
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 group, send email to
rubyonrails-talk+un
How do I retrieve a ruby app that I've pushed to github? I've been
pushing as I've been developing on my pc, and now I want to get the app
on my laptop, so I can develop on my laptop.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Googl
I downloaded:
git-1.7.6.1-x86_64-snow-leopard.dmg
and went through the install wizard, but the command:
$ git --version
returned:
git command not found
But after I Quit Terminal, and reopened Terminal, I got:
$ git --version
git version 1.7.6.1
Thanks.
--
Posted via http://www.ruby-forum
Anyway, can someone confirm what git I am supposed to install?
--
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 unsubscr
Walter Davis wrote in post #1022969:
> On Sep 20, 2011, at 2:14 PM, 7stud -- wrote:
>
>> Xcode 4 isn't free, so I downloaded Xcode 3.2.6, and apparently it
>> doesn't install git.
>
> I wonder why you would be seeing a price. I just looked in the Mac App
>
leoncio caminha wrote in post #1022992:
> its a apple pie dude
>
> http://code.google.com/p/git-osx-installer/downloads/list?can=3
>
> and choose a version of Mac OS
>
Well...that's the problem.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed t
Here:
http://developer.apple.com/support/xcode/
it says:
===
Paid members of the Mac and iOS Developer Programs have access to the
latest Xcode developer tools, SDKs, and pre-release software. Program
members can download Xcode 4.
Xcode 4.1 for Lion is available as a free download from the Ma
Does xcode 4 work on osx 10.6.8? If so, where can I download it?
--
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 unsub
Robert Walker wrote in post #1022904:
> Robert Walker wrote in post #1022903:
>> We can't tell without knowing what hardware you are running. If you Mac
>> has a 64 bit processor then install the x86_64 bit version. This is most
>> likely the case. For example: the only MacBook Pro that was not 64
Hardware Overview:
Model Name: MacBook
Model Identifier: MacBook2,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.16 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 2 GB
Bus Speed: 667 MHz
Boot ROM Version: MB21.00A5.B07
SMC Version
git presents me with these choices:
git-1.7.6.1-i386-snow-leopard.dmg
git-1.7.6.1-x86_64-snow-leopard.dmg
git-1.7.6-i386-snow-leopard.dmg
git-1.7.6-x86_64-snow-leopard.dmg
git-1.7.5.4-i386-leopard.dmg
git-1.7.5.4-x86_64-leopard.dmg
git-1.7.5.3-i386-leopard.dmg
H
Here is an example:
require 'erb'
require 'sqlite3'
template = ERB.new <<"END_OF_TEMPLATE"
<%= name %>
div {color:blue;}
Name: <%= name %>
Color: <%= color %>
END_OF_TEMPLATE
db = SQLite3::Database.new( "my_db.db" )
table = "test"
db.execute( "select * from #{table}" ) do |row|
name
"\"Jochen Kächelin - 8frogs.de\"" wrote in post
#1022809:
> what the recommended way to generate static html files based on a
> database structure, for example 1000 product pages.
>
> i would like to specify s template and embed css styles.
>
> i use rails 3.1
>
> thanx
erb templates are part of
Slava Mikerin wrote in post #1022739:
> Hello,
> I wonder how to tell my routes.rb to route requests to a resource to
> it's parent controller
>
> class Foo < Bar
> end
>
>
> resources :foos ===> controller :bars
resources :foos, :controller => :bars
--
Posted via http://www.ruby-forum.com/.
-
John Merlino wrote in post #1022569:
> Hey all,
>
> This is my understanding of html and browsers. On the server, html is
> plain text. When the browser sends request to server to fetch a
> document, if the file is not already in html format, perhaps instead
> in an rb file, ruby or whatever the s
Colin Law wrote in post #1022477:
> On 17 September 2011 20:49, 7stud -- wrote:
>> --output:--
>>
>> undefined method `id' for [1, 2]:Array (NoMethodError)
>
> I am not sure why you would expect anything else. @sub-seasons is an
> array. The collect method pas
@sub_seasons = [
[1, 2],
[10, 20],
[100, 200]
]
@sub_seasons.collect do |element|
element.id
end
--output:--
undefined method `id' for [1, 2]:Array (NoMethodError)
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "
Well, then how about:
if not user.valid?
logger.info user.errors.full_messages
end
--
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@google
> So, I was thinking, wouldn't it be nice if Rails automatically
> saved the attributes of an object to the database when
> the validations fail?
No, it wouldn't. Do you really want to have billions of records in your
database from all the spam bots trying to log in?
--
Posted via http://www.r
Hassan Schroeder wrote in post #1021992:
> On Wed, Sep 14, 2011 at 4:58 AM, Pab wrote:
>
>> RJS error:
>>
>> TypeError: element.getElementsByTagName is not a function
>
> Exactly what it says: getElementsByTagName is a basic JavaScript
> function of *document*. So you need to look at your JS to se
You probably should't use prototype methods when you've chosen jquery as
your js framework.
--
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
> How can I use this model to write a CLI program,
Well, you might offer random people $100 so that you can get them to
read through all your specs. Then you can pay someone $5,000 to write
the code for you.
gl
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
result = [2, 4, 1, 3, 5, 6, 8].chunk do |num|
num.even?
end
result.each do |even_result, a_chunk|
p [even_result, a_chunk]
end
--output:--
[true, [2, 4]]
[false, [1, 3, 5]]
[true, [6, 8]]
e = DATA.chunk do |line|
ascii_code_for_first_letter = line.ord
end
e.each do |ascii_code, lin
Dave Aronson wrote in post #1021425:
> On Sun, Sep 11, 2011 at 23:37, Joan Gu wrote:
>
>>
>> > name="schedule_report[active_17]">
>> ...
>>
>> Problem:
>> The value of "1" is always passed, even if the box is UNCHECKED.
>> Please help!
>
> Passed to your browser as evidenced by the above rend
Go read a basic html tutorial, concentrating on the syntax of an
tag.
--
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
Don't forget about that Enumerable link:
u.matches.any? {|match| match.id == 2}.should be_false
--
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-
And for some reason you thought it unimportant to list what directory
you were at when issuing those commands?
--
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
Frederick Cheung wrote in post #1021129:
> On Sep 10, 12:18pm, dwormuth wrote:
>> "operations" )) %>").show()
>> $("#services").html("<%= escape_javascript(render(:partial => foo ))
>> %>").show()
>>
>> or
>>
>> $("#services").html("<%= escape_javascript(render(:partial => $
>> (this).data("sectio
Gordon Yeong wrote in post #1020881:
> Hello, 7stud,
> I followed your recommendations and I managed to get good results.
>
> When I define the return data and then not put any "render" in the
> controller action, it works.
>
> -
Spelled it correctly in the title. A good hint as to what was wrong:
Object::TCPserver (NameError)
Sometimes, if you know your code is right, but it still won't work,
delete the offending line and retype it.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you a
Suppose I have this controller:
class SalesController < ApplicationController
respond_to ?
def get_price
@price = Product.find(params[:product_id]).price
respond_with ?
end
end
1) What do I specify for respond_to() so that get_price() will accept
ajax requests?
2) What d
Can you post the your form tag?
--
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 group, send email
Why would you think prototype code would work in a jquery app? What
version of rails are you using? What have you done to setup your app
for jquery? Why did you think that information was unnecessary? Aren't
you aware that rails changes every week?
--
Posted via http://www.ruby-forum.com/.
The following tests *do* work as expected:
describe "GET 'contact'" do
it "should be successful" do
{ :get => 'pages/contact' }.should be_routable
end
end
describe "POST 'contact'" do
it "should be successful" do
{ :post => 'pages/contact' }.should be_routable
Dmitry Suzdalev wrote in post #1020600:
>
> Can anybody hint my why does this happen? I'm only starting learning
> about
> RoR :) Earlier it seemed to me that these 'get/post' methods of TestCase
> do
> respect routes.rb...
>
> Am I missing something obvious? :)
>
With this controller:
class Pag
Rodrigo Ruiz wrote in post #1020627:
> is the Agile book written entirely in rails 3.1?
Rails 3.1 was released last week. There are no rails 3.1 books.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk"
Anyone have any explanation for the behavior I'm seeing?
--
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 fr
> I checked the db and it has got 0 entries in
> the countries table.
Which db?
--
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@googlegroup
felix wrote in post #1020377:
> def test
> yield
> end
>
yield() means: execute the block that is specified in the method call.
> test do
> p "a"
> end
>
That syntax calls test() and everything after 'do' is a block, which
ruby automatically passes to the method.
Note that your definition o
Perry Smith wrote in post #1020442:
> I've been fighting these problems since I moved to Ruby 1.9. I am now
> using Ruby 1.9.2 with Rails 2.3.11 and I am still having problems. The
> symptom is errors with this message:
>
> (incompatible character encodings: UTF-8 and ISO-8859-1)
>
> I've marked
1) I do this:
<%=
javascript_include_tag(
"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js";,
"jquery.rails.js"
)
%>
No gem needed. You can read here about the advantages of using a google
link:
http://encosia.com/3-reasons-why-you-should-let-google-host-j
Good luck using java.
--
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 group, send email to
rubyo
Well, it looks to me like you have an outer hash with key/values, and a
value is an array of hashes, so you would do this:
main_hash["items"][1]["title"] ==> 'xyz'
main_hash["items"][1]["title"] ==> 'xyz'
^ ^
| |
array |
|
That isn't valid ruby syntax. Are you trying to parse a file with that
syntax?
--
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@googlegroup
Huh?
--
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 group, send email to
rubyonrails-talk+unsub
Miquel Cubel wrote in post #1020180:
> Hi,
>
> With rails 3.1 and some new gems versions the books can become
> complicated.
>
> There are better ways to do it, but in your case (starting from
> zero) I'll suggest:
>
> 1. Delete new versions of rails:
> gem uninstall rails
>
>
Frederick Cheung wrote in post #1020189:
> On Sep 5, 8:48am, 7stud -- wrote:
>> rake db:migrate
>>
>> The whole idea behind Bundler and your Gemfile is to specify which gems
>> you want to use for your app. To use the gems in your Gemfile when
>> executing
It seems to me that the = sign in haml is arbitrary and capricious. For
instance, how does the syntax:
- wrap do
- page_title "Teams List View"
result in anything being added to the page?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
By the way, if you put some html at the top of the page, e.g.
%p Index.html.haml
- wrap do
- page_title "Teams List View"
Your wrap() method will double render the whole page.
Based on my experiments with haml, I would never consider using a
multiline ruby block that contains a rails helper.
What happens if you get rid of concat()?
--
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 group, s
Curiously, you listed the versions of every program except the one that
is throwing the error.
> I've gone through the exercises in chapter 2 with no problems.
Not very helpful for people who don't have the book.
I don't know if this is your problem or notbut in any case you
should never
1 - 100 of 454 matches
Mail list logo