Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Grabek committed Sep 5, 2014
1 parent 7cc4adf commit 12b9175
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -58,6 +58,26 @@ class UserMailerPreview
end
```

### Parameters as instance variables

All parameters in serach query (after ?) will be avaiable in SomethingMailerPreview class. For example, if URL to mailer preview looks like:

```ruby
/emails/user_mailer_preview-welcome?company_id=1
```

the method welcome in UserMailerPreview have @company_id variable defined:

```ruby
class UserMailerPreview

def welcome
company = Company.find(@company_id)
end

end
```


## Routing

Expand Down

0 comments on commit 12b9175

Please sign in to comment.